* [Buildroot] [PATCH] bash: disable bash malloc by default
@ 2017-05-23 17:19 Daniel Sabogal
2017-05-31 20:37 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Sabogal @ 2017-05-23 17:19 UTC (permalink / raw)
To: buildroot
Bash's malloc relies on sbrk which is implemented as
a fail-only stub in musl. Presently, it is disabled
when configured for static libs. Instead, default to
using libc malloc.
Fixes:
# bash
bash: xmalloc: locale.c:81: cannot allocate 18 bytes (0 bytes allocated)
Signed-off-by: Daniel Sabogal <dsabogalcc@gmail.com>
---
package/bash/bash.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/bash/bash.mk b/package/bash/bash.mk
index 639f01204..32c87a659 100644
--- a/package/bash/bash.mk
+++ b/package/bash/bash.mk
@@ -9,7 +9,7 @@ BASH_SITE = $(BR2_GNU_MIRROR)/bash
# Build after since bash is better than busybox shells
BASH_DEPENDENCIES = ncurses readline host-bison \
$(if $(BR2_PACKAGE_BUSYBOX),busybox)
-BASH_CONF_OPTS = --with-installed-readline
+BASH_CONF_OPTS = --with-installed-readline --without-bash-malloc
BASH_LICENSE = GPL-3.0+
BASH_LICENSE_FILES = COPYING
@@ -24,7 +24,7 @@ BASH_CONF_ENV += \
# The static build needs some trickery
ifeq ($(BR2_STATIC_LIBS),y)
-BASH_CONF_OPTS += --enable-static-link --without-bash-malloc
+BASH_CONF_OPTS += --enable-static-link
# bash wants to redefine the getenv() function. To check whether this is
# possible, AC_TRY_RUN is used which is not possible in
# cross-compilation.
--
2.13.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] bash: disable bash malloc by default
2017-05-23 17:19 [Buildroot] [PATCH] bash: disable bash malloc by default Daniel Sabogal
@ 2017-05-31 20:37 ` Thomas Petazzoni
2017-06-01 14:44 ` Peter Korsgaard
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2017-05-31 20:37 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 23 May 2017 13:19:31 -0400, Daniel Sabogal wrote:
> Bash's malloc relies on sbrk which is implemented as
> a fail-only stub in musl. Presently, it is disabled
> when configured for static libs. Instead, default to
> using libc malloc.
>
> Fixes:
> # bash
> bash: xmalloc: locale.c:81: cannot allocate 18 bytes (0 bytes allocated)
>
> Signed-off-by: Daniel Sabogal <dsabogalcc@gmail.com>
> ---
> package/bash/bash.mk | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to master, thanks. Peter: I believe this can be applied on
2017.02.x as well.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] bash: disable bash malloc by default
2017-05-31 20:37 ` Thomas Petazzoni
@ 2017-06-01 14:44 ` Peter Korsgaard
0 siblings, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2017-06-01 14:44 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> Hello,
> On Tue, 23 May 2017 13:19:31 -0400, Daniel Sabogal wrote:
>> Bash's malloc relies on sbrk which is implemented as
>> a fail-only stub in musl. Presently, it is disabled
>> when configured for static libs. Instead, default to
>> using libc malloc.
>>
>> Fixes:
>> # bash
>> bash: xmalloc: locale.c:81: cannot allocate 18 bytes (0 bytes allocated)
>>
>> Signed-off-by: Daniel Sabogal <dsabogalcc@gmail.com>
>> ---
>> package/bash/bash.mk | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
> Applied to master, thanks. Peter: I believe this can be applied on
> 2017.02.x as well.
Indeed - Committed to 2017.02.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-01 14:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-23 17:19 [Buildroot] [PATCH] bash: disable bash malloc by default Daniel Sabogal
2017-05-31 20:37 ` Thomas Petazzoni
2017-06-01 14:44 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox