diff --git a/bash.changes b/bash.changes index 8eb08e02..6c1224cb 100644 --- a/bash.changes +++ b/bash.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 17 13:10:22 UTC 2012 - werner@suse.de + +- Do not mix xmalloc/xfree of libreadline and bash by making the + libreadline version weak symbols instead of private symbols + ------------------------------------------------------------------- Fri Aug 24 14:31:35 UTC 2012 - werner@suse.de diff --git a/bash.spec b/bash.spec index ed185f09..64676e8a 100644 --- a/bash.spec +++ b/bash.spec @@ -82,6 +82,7 @@ Patch23: readline-5.2-conf.patch Patch24: readline-6.2-metamode.patch Patch25: readline-6.2-endpw.dif Patch26: readline-6.2-msgdynamic.patch +Patch27: readline-6.2-xmalloc.dif Patch30: readline-6.2-destdir.patch Patch40: bash-4.1-bash.bashrc.dif Patch42: audit-patch @@ -307,6 +308,7 @@ done %patch24 -p2 -b .metamode #%patch25 -p2 -b .endpw %patch26 -p2 -b .msgdy +%patch27 -p0 -b .xm %patch30 -p0 -b .destdir %patch20 -p0 -b .0 @@ -353,15 +355,6 @@ pushd ../readline-%{rl_vers}%{extend} LARGEFILE="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" fi rm -f ./test64 - (cat > rl.map)<<-'EOF' - { - local: - /* _rl*; */ - xfree; - xmalloc; - xrealloc; - }; - EOF (cat > dyn.map)<<-'EOF' { *; @@ -383,7 +376,6 @@ pushd ../readline-%{rl_vers}%{extend} cflags -Wl,-O2 LDFLAGS cflags -Wl,--hash-size=8599 LDFLAGS cflags -Wl,-rpath,%{_ldldir}/%{bash_vers} LDFLAGS - cflags -Wl,--version-script=${PWD}/rl.map LDFLAGS cflags -Wl,--dynamic-list=${PWD}/dyn.map LDFLAGS CC=gcc CC_FOR_BUILD="$CC" diff --git a/readline-6.2-xmalloc.dif b/readline-6.2-xmalloc.dif new file mode 100644 index 00000000..ca8b95a8 --- /dev/null +++ b/readline-6.2-xmalloc.dif @@ -0,0 +1,37 @@ +--- xfree.c ++++ xfree.c 2012-10-17 12:48:37.862344784 +0000 +@@ -48,3 +48,6 @@ xfree (string) + if (string) + free (string); + } ++ ++#undef xfree ++extern void xfree PARAMS((void *)) __attribute__ ((weak, alias ("_rl_xfree"))); +--- xmalloc.c ++++ xmalloc.c 2012-10-17 12:48:28.430844890 +0000 +@@ -77,3 +77,8 @@ xrealloc (pointer, bytes) + memory_error_and_abort ("xrealloc"); + return (temp); + } ++ ++#undef xmalloc ++#undef xrealloc ++extern PTR_T xmalloc PARAMS((size_t)) __attribute__ ((weak, alias ("_rl_xmalloc"))); ++extern PTR_T xrealloc PARAMS((void *, size_t)) __attribute__ ((weak, alias ("_rl_xrealloc"))); +--- xmalloc.h ++++ xmalloc.h 2012-10-17 12:27:20.325156790 +0000 +@@ -38,6 +38,14 @@ + + #endif /* !PTR_T */ + ++#undef xmalloc ++#undef xrealloc ++#undef xfree ++ ++#define xmalloc _rl_xmalloc ++#define xrealloc _rl_xrealloc ++#define xfree _rl_xfree ++ + extern PTR_T xmalloc PARAMS((size_t)); + extern PTR_T xrealloc PARAMS((void *, size_t)); + extern void xfree PARAMS((void *));