Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc/dist/libsanitizer/asan Disable glibc worka...



details:   https://anonhg.NetBSD.org/src/rev/cb0864c2fd2a
branches:  trunk
changeset: 815949:cb0864c2fd2a
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jun 09 14:30:57 2016 +0000

description:
Disable glibc workaround for non linux. Rin Okuyama

diffstat:

 external/gpl3/gcc/dist/libsanitizer/asan/asan_malloc_linux.cc |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r f31d8cd4e91a -r cb0864c2fd2a external/gpl3/gcc/dist/libsanitizer/asan/asan_malloc_linux.cc
--- a/external/gpl3/gcc/dist/libsanitizer/asan/asan_malloc_linux.cc     Thu Jun 09 09:01:21 2016 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/asan/asan_malloc_linux.cc     Thu Jun 09 14:30:57 2016 +0000
@@ -56,9 +56,14 @@
 }
 
 INTERCEPTOR(void*, malloc, uptr size) {
+#if SANITIZER_LINUX
+  // This is a workaround for glibc, by which asan_malloc() fails into infinite
+  // recursion of AsanInitInternal(): http://reviews.llvm.org/rL254395
+  // It is irrelevant to us, rather causes abort due to shortage of buffer.
   if (UNLIKELY(!asan_inited))
     // Hack: dlsym calls malloc before REAL(malloc) is retrieved from dlsym.
     return AllocateFromLocalPool(size);
+#endif
   GET_STACK_TRACE_MALLOC;
   return asan_malloc(size, &stack);
 }



Home | Main Index | Thread Index | Old Index