Module Name:    src
Committed By:   christos
Date:           Thu Jun  9 14:30:57 UTC 2016

Modified Files:
        src/external/gpl3/gcc/dist/libsanitizer/asan: asan_malloc_linux.cc

Log Message:
Disable glibc workaround for non linux. Rin Okuyama


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
    src/external/gpl3/gcc/dist/libsanitizer/asan/asan_malloc_linux.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/libsanitizer/asan/asan_malloc_linux.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/asan/asan_malloc_linux.cc:1.4 src/external/gpl3/gcc/dist/libsanitizer/asan/asan_malloc_linux.cc:1.5
--- src/external/gpl3/gcc/dist/libsanitizer/asan/asan_malloc_linux.cc:1.4	Tue Jun  7 02:14:18 2016
+++ src/external/gpl3/gcc/dist/libsanitizer/asan/asan_malloc_linux.cc	Thu Jun  9 10:30:57 2016
@@ -56,9 +56,14 @@ INTERCEPTOR(void, cfree, void *ptr) {
 }
 
 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);
 }

Reply via email to