diff --git a/glibc-2.16-mcheck.patch b/glibc-2.16-mcheck.patch new file mode 100644 index 0000000..a2287c2 --- /dev/null +++ b/glibc-2.16-mcheck.patch @@ -0,0 +1,25 @@ +diff --git a/malloc/mcheck.c b/malloc/mcheck.c +index 9213740..7491c49 100644 +--- a/malloc/mcheck.c ++++ b/malloc/mcheck.c +@@ -370,6 +370,12 @@ mabort (enum mcheck_status status) + #endif + } + ++#ifndef malloc_opt_barrier ++#define malloc_opt_barrier(x) \ ++({ __typeof (x) __x = x; __asm ("" : "+m" (__x)); __x; }) ++#define malloc_force_eval(x) __asm __volatile ("" : : "m" (x)) ++#endif ++ + int + mcheck (func) + void (*func) (enum mcheck_status); +@@ -381,6 +387,7 @@ mcheck (func) + { + /* We call malloc() once here to ensure it is initialized. */ + void *p = malloc (0); ++ p = malloc_opt_barrier (p); + free (p); + + old_free_hook = __free_hook; diff --git a/glibc.changes b/glibc.changes index a0edbcc..1f3006a 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu May 3 11:05:36 UTC 2012 - aj@suse.de + +- Fix dynamic linker name for ARMv5. + +------------------------------------------------------------------- +Thu Apr 26 14:02:37 UTC 2012 - aj@suse.de + +- Fix mcheck (optimization problem with gcc 4.7) + ------------------------------------------------------------------- Wed Apr 25 10:40:20 UTC 2012 - aj@suse.de diff --git a/glibc.spec b/glibc.spec index 239ac38..c917b47 100644 --- a/glibc.spec +++ b/glibc.spec @@ -297,6 +297,8 @@ Patch2007: glibc-sw13618-2.patch Patch2008: glibc-ld-profile.patch # PATCH-FIX-OPENSUSE _fini does not have proper unwinding information on x86_64 bso#11610 Patch2009: glibc-fini-unwind.diff +# PATCH-FIX-OPENSUSE malloc(0);free gets optimized out +Patch2010: glibc-2.16-mcheck.patch %description The GNU C Library provides the most important standard libraries used @@ -558,6 +560,7 @@ rm nscd/s-stamp # XXX Disable, it breaks the testsuite, test elf/tst-audit2 # %patch2008 -p1 %patch2009 -p1 +%patch2010 -p1 # # Inconsistency detected by ld.so: dl-close.c: 719: _dl_close: Assertion `map->l_init_called' failed! @@ -1109,7 +1112,7 @@ exit 0 # Keep compatibility link /%{_lib}/ld-linux.so.3 %else -/%{_lib}/ld-linux.so.2 +/%{_lib}/ld-linux.so.3 %endif %endif %ifarch ia64