tbb/tbb-2019-attributes.patch

32 lines
1.9 KiB
Diff
Raw Normal View History

2019-05-24 01:08:10 +00:00
diff -up tbb-2019_U7/src/tbbmalloc/proxy.cpp.orig tbb-2019_U7/src/tbbmalloc/proxy.cpp
--- tbb-2019_U7/src/tbbmalloc/proxy.cpp.orig 2019-05-23 04:35:29.000000000 -0600
+++ tbb-2019_U7/src/tbbmalloc/proxy.cpp 2019-05-23 18:25:22.360659477 -0600
@@ -146,7 +146,7 @@ static inline void initPageSize()
1) detection that the proxy library is loaded
2) check that dlsym("malloc") found something different from our replacement malloc
*/
-extern "C" void *__TBB_malloc_proxy(size_t) __attribute__ ((alias ("malloc")));
2019-05-24 01:08:10 +00:00
+extern "C" void *__TBB_malloc_proxy(size_t) __attribute__ ((alias ("malloc"), copy (malloc)));
static void *orig_msize;
@@ -293,11 +293,11 @@ void *aligned_alloc(size_t alignment, si
// in conjunction with standard malloc/free, so we must ovberload them.
// Bionic doesn't have them. Not removing from the linker scripts,
// as absent entry points are ignored by the linker.
-void *__libc_malloc(size_t size) __attribute__ ((alias ("malloc")));
-void *__libc_calloc(size_t num, size_t size) __attribute__ ((alias ("calloc")));
-void *__libc_memalign(size_t alignment, size_t size) __attribute__ ((alias ("memalign")));
-void *__libc_pvalloc(size_t size) __attribute__ ((alias ("pvalloc")));
-void *__libc_valloc(size_t size) __attribute__ ((alias ("valloc")));
2019-05-24 01:08:10 +00:00
+void *__libc_malloc(size_t size) __attribute__ ((alias ("malloc"), copy (malloc)));
+void *__libc_calloc(size_t num, size_t size) __attribute__ ((alias ("calloc"), copy (calloc)));
+void *__libc_memalign(size_t alignment, size_t size) __attribute__ ((alias ("memalign"), copy (memalign)));
+void *__libc_pvalloc(size_t size) __attribute__ ((alias ("pvalloc"), copy (pvalloc)));
+void *__libc_valloc(size_t size) __attribute__ ((alias ("valloc"), copy (valloc)));
// call original __libc_* to support naive replacement of free via __libc_free etc
void __libc_free(void *ptr)
2019-05-24 01:08:10 +00:00
Diff finished. Wed May 23 18:26:03 2019