Hi Chet,
there've been follow-up discussions and reviews here with our linker
folks (see [1] for some details on the bug that was open to capture
those) and consensus is that best approach is to not compile with bash's
own malloc routines.
Indeed, ld(1)'s -z interpose option is a rather big hammer, as it
establishes that the application can interpose on *all* of the symbols
that it offers, rather than just the few related to malloc.
Hence, my question to you is: are there any real benefit these days of
using bash's own malloc function rather than the one from the system ?
or, otherwise said, what do bash lose when it's compiled with option
--without-bash-malloc ?
TIA,
Serge
[1] http://bugs.opensolaris.org/view_bug.do?bug_id=6778453
On 10/30/08 08:26 PM, Chet Ramey wrote:
ah OK, so I guess I need to work on a customized patched for 3.2 then.
Any ideas yet of what the exact change will be in configure.bin so that
I can apply to same in our deliveries ?
*** ../bash-3.2-patched/configure.in 2007-12-14 21:12:29.000000000 -0500
--- configure.in 2008-10-23 09:10:57.000000000 -0400
***************
*** 992,997 ****
--- 1009,1017 ----
sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;;
+ solaris2.8*) LOCAL_CFLAGS=-DSOLARIS LOCAL_LDFLAGS='-z interpose' ;;
+ solaris2.9*) LOCAL_CFLAGS=-DSOLARIS LOCAL_LDFLAGS='-z interpose' ;;
+ solaris2.10*) LOCAL_CFLAGS=-DSOLARIS LOCAL_LDFLAGS='-z interpose' ;;
solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
Also, do you or would you have a bug # for reference ?
Sorry, I don't.
Chet