Dr. Werner Fink 2012-10-17 13:13:20 +00:00 committed by Git OBS Bridge
parent a1ec608d40
commit daf88598f2
3 changed files with 45 additions and 10 deletions

View File

@ -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 Fri Aug 24 14:31:35 UTC 2012 - werner@suse.de

View File

@ -82,6 +82,7 @@ Patch23: readline-5.2-conf.patch
Patch24: readline-6.2-metamode.patch Patch24: readline-6.2-metamode.patch
Patch25: readline-6.2-endpw.dif Patch25: readline-6.2-endpw.dif
Patch26: readline-6.2-msgdynamic.patch Patch26: readline-6.2-msgdynamic.patch
Patch27: readline-6.2-xmalloc.dif
Patch30: readline-6.2-destdir.patch Patch30: readline-6.2-destdir.patch
Patch40: bash-4.1-bash.bashrc.dif Patch40: bash-4.1-bash.bashrc.dif
Patch42: audit-patch Patch42: audit-patch
@ -307,6 +308,7 @@ done
%patch24 -p2 -b .metamode %patch24 -p2 -b .metamode
#%patch25 -p2 -b .endpw #%patch25 -p2 -b .endpw
%patch26 -p2 -b .msgdy %patch26 -p2 -b .msgdy
%patch27 -p0 -b .xm
%patch30 -p0 -b .destdir %patch30 -p0 -b .destdir
%patch20 -p0 -b .0 %patch20 -p0 -b .0
@ -353,15 +355,6 @@ pushd ../readline-%{rl_vers}%{extend}
LARGEFILE="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" LARGEFILE="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
fi fi
rm -f ./test64 rm -f ./test64
(cat > rl.map)<<-'EOF'
{
local:
/* _rl*; */
xfree;
xmalloc;
xrealloc;
};
EOF
(cat > dyn.map)<<-'EOF' (cat > dyn.map)<<-'EOF'
{ {
*; *;
@ -383,7 +376,6 @@ pushd ../readline-%{rl_vers}%{extend}
cflags -Wl,-O2 LDFLAGS cflags -Wl,-O2 LDFLAGS
cflags -Wl,--hash-size=8599 LDFLAGS cflags -Wl,--hash-size=8599 LDFLAGS
cflags -Wl,-rpath,%{_ldldir}/%{bash_vers} LDFLAGS cflags -Wl,-rpath,%{_ldldir}/%{bash_vers} LDFLAGS
cflags -Wl,--version-script=${PWD}/rl.map LDFLAGS
cflags -Wl,--dynamic-list=${PWD}/dyn.map LDFLAGS cflags -Wl,--dynamic-list=${PWD}/dyn.map LDFLAGS
CC=gcc CC=gcc
CC_FOR_BUILD="$CC" CC_FOR_BUILD="$CC"

37
readline-6.2-xmalloc.dif Normal file
View File

@ -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 *));