[OE-core] [PATCH] bash: Disable custom memory allocator

Khem Raj raj.khem at gmail.com
Sat Oct 10 00:25:50 UTC 2015


> On Oct 9, 2015, at 3:21 PM, Aníbal Limón <anibal.limon at linux.intel.com> wrote:
> 
> Bash is failing trying to allocate memory [1] using the custom
> memory allocator if we disable it the issue is fixed.
> 
> The major distributions also disabled by default [2], so we
> don't have a good reason to use it.

The fix is OK but commit message needs improvement. The underlying issue is due to bash’s malloc using brk() calls
to allocate memory, which fail when address randomization is enabled in kernel. sbrk() based custom allocators are obsolete
on the downside we will lose a bit of performance but correctness is more important here.

> 
> [YOCTO #8452]
> 
> [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8452#c0
> [2] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8452#c5
> 
> Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
> ---
> meta/recipes-extended/bash/bash.inc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
> index c06f157..020409f 100644
> --- a/meta/recipes-extended/bash/bash.inc
> +++ b/meta/recipes-extended/bash/bash.inc
> @@ -7,7 +7,7 @@ DEPENDS = "ncurses bison-native"
> inherit autotools gettext texinfo update-alternatives ptest
> 
> EXTRA_AUTORECONF += "--exclude=autoheader"
> -EXTRA_OECONF = "--enable-job-control"
> +EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
> 
> # If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
> # startup files, even if they are not interactive.
> --
> 1.9.1
> 
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20151009/b8d60d4b/attachment-0002.sig>


More information about the Openembedded-core mailing list