From: Robert Yang <liezhi.yang@windriver.com>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>,
Khem Raj <raj.khem@gmail.com>
Cc: Zhenfeng.Zhao@windriver.com
Subject: Re: [PATCH 2/2] icu 3.6: do_install failed: Segmentation fault
Date: Fri, 29 Jun 2012 13:26:59 +0800 [thread overview]
Message-ID: <4FED3CA3.60605@windriver.com> (raw)
In-Reply-To: <CAMKF1spBJ-iVuHC_BxscqAw355gUMCYnh_g6zwT4oOwz91hxyA@mail.gmail.com>
On 06/29/2012 12:54 PM, Khem Raj wrote:
> On Thu, Jun 28, 2012 at 6:54 PM, Robert Yang<liezhi.yang@windriver.com> wrote:
>> I've changed the cmd[BUFSIZ] to cmd[2048], which should be enough for us,
>> and
>> pushed it to the git repo again:
>
> ideally allocating a string on heap and then freeing
> it after use would fix this issue once for all.
>
Thanks Khem, but the problem is that even we use:
void *malloc(size_t size)
We should still use a constant size since the length of the command
is unknown (or not obviously known):
#else
sprintf(cmd, "%s %s%s -f %s %s %s %s %s",
make,
o->install ? "INSTALLTO=" : "",
o->install ? o->install : "",
o->makeFile,
o->clean ? "clean" : "",
o->rebuild ? "rebuild" : "",
o->install ? "install" : "",
o->makeArgs);
So I simply increase the size of cmd[] which is a simple fix.
// Robert
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
next prev parent reply other threads:[~2012-06-29 5:38 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
2012-06-29 4:54 ` Khem Raj
2012-06-29 5:26 ` Robert Yang [this message]
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=4FED3CA3.60605@windriver.com \
--to=liezhi.yang@windriver.com \
--cc=Zhenfeng.Zhao@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
/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