7404e0cda5
Refresh glibc-2.16-avx.patch and handle FMA4. (forwarded request 116778 from a_jaeger) OBS-URL: https://build.opensuse.org/request/show/116779 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glibc?expand=0&rev=108
26 lines
723 B
Diff
26 lines
723 B
Diff
Index: glibc-2.15/malloc/mcheck.c
|
|
===================================================================
|
|
--- glibc-2.15.orig/malloc/mcheck.c
|
|
+++ glibc-2.15/malloc/mcheck.c
|
|
@@ -371,6 +371,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);
|
|
@@ -382,6 +388,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;
|