Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Cc: Zhenfeng.Zhao@windriver.com
Subject: Re: [PATCH 2/2] icu 3.6: do_install failed: Segmentation fault
Date: Fri, 29 Jun 2012 09:54:33 +0800	[thread overview]
Message-ID: <4FED0AD9.5010102@windriver.com> (raw)
In-Reply-To: <63976f811fe5cb0c5688fe6847975499ac2d9e51.1340773014.git.liezhi.yang@windriver.com>



On 06/27/2012 04:19 PM, Robert Yang wrote:
> There is a "Segmentation fault" error when the tmpdir is longer than 470
> (or less), this is because it used "char cmd[1024]" which is not enough
> for the command line. Allocate a larger memory size should fix this problem.
>
> [YOCTO #2664]
>
> Signed-off-by: Robert Yang<liezhi.yang@windriver.com>
> ---
>   .../icu/files/larger-cmd-size.patch                |   27 ++++++++++++++++++++
>   meta/recipes-support/icu/icu-3.6.inc               |    1 +
>   meta/recipes-support/icu/icu_3.6.bb                |    2 +-
>   3 files changed, 29 insertions(+), 1 deletions(-)
>   create mode 100644 meta/recipes-support/icu/files/larger-cmd-size.patch
>
> diff --git a/meta/recipes-support/icu/files/larger-cmd-size.patch b/meta/recipes-support/icu/files/larger-cmd-size.patch
> new file mode 100644
> index 0000000..4b5f73d
> --- /dev/null
> +++ b/meta/recipes-support/icu/files/larger-cmd-size.patch
> @@ -0,0 +1,27 @@
> +Allocate a larger memory size for cmd
> +
> +The length of the command line can be longer than 1024 sometimes,
> +which will cause a "Segmentation fault" error.
> +
> +Signed-off-by: Robert Yang<liezhi.yang@windriver.com>
> +
> +Upstream-Status: Pending
> +---
> + tools/pkgdata/pkgdata.c |    2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/tools/pkgdata/pkgdata.c b/tools/pkgdata/pkgdata.c
> +--- a/tools/pkgdata/pkgdata.c
> ++++ b/tools/pkgdata/pkgdata.c
> +@@ -439,7 +439,7 @@ main(int argc, char* argv[]) {
> + /* POSIX - execute makefile */
> + static int executeMakefile(const UPKGOptions *o)
> + {
> +-    char cmd[1024];
> ++    char cmd[BUFSIZ];

I've changed the cmd[BUFSIZ] to cmd[2048], which should be enough for us, and
pushed it to the git repo again:

   git://git.pokylinux.org/poky-contrib robert/icu
   http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/icu

// Robert

> +     /*char pwd[1024];*/
> +     const char *make;
> +     int rc;
> +--
> +1.7.10.2
> +
> diff --git a/meta/recipes-support/icu/icu-3.6.inc b/meta/recipes-support/icu/icu-3.6.inc
> index d3391fe..d969caa 100644
> --- a/meta/recipes-support/icu/icu-3.6.inc
> +++ b/meta/recipes-support/icu/icu-3.6.inc
> @@ -6,6 +6,7 @@ BASE_SRC_URI = "ftp://ftp.software.ibm.com/software/globalization/icu/3.6/icu4c-
>              file://gccfix.patch \
>              file://fix-parallel-build.patch \
>              file://use-g++-for-linking.patch \
> +           file://larger-cmd-size.patch \
>              "
>   SRC_URI = "${BASE_SRC_URI} \
>              file://noldlibpath.patch \
> diff --git a/meta/recipes-support/icu/icu_3.6.bb b/meta/recipes-support/icu/icu_3.6.bb
> index d7be522..f941acf 100644
> --- a/meta/recipes-support/icu/icu_3.6.bb
> +++ b/meta/recipes-support/icu/icu_3.6.bb
> @@ -1,6 +1,6 @@
>   require icu-3.6.inc
>
> -PR = "r8"
> +PR = "r9"
>
>   SRC_URI[md5sum] = "6243f7a19e03e05403ce84e597510d4c"
>   SRC_URI[sha256sum] = "5135e8d69d6206d320515df7aeee7027711ab1aef9d8dbf29571a97a9746b041"



  reply	other threads:[~2012-06-29  2:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27  8:19 [PATCH 0/2] icu 3.6: do_install failed: Segmentation fault Robert Yang
2012-06-27  8:19 ` [PATCH 1/2] icu 3.6: dropp apply=yes from path Robert Yang
2012-06-27  8:19 ` [PATCH 2/2] icu 3.6: do_install failed: Segmentation fault Robert Yang
2012-06-29  1:54   ` Robert Yang [this message]
2012-06-29  4:54     ` Khem Raj
2012-06-29  5:26       ` Robert Yang
2012-06-29  6:06         ` Khem Raj
2012-06-29  6:30           ` Robert Yang
2012-06-29  7:14             ` Khem Raj
2012-07-03 17:50 ` [PATCH 0/2] " Saul Wold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FED0AD9.5010102@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=Zhenfeng.Zhao@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox