[compiler-rt] r199872 - [asan] Enable replacement new/delete on Android.

Evgeniy Stepanov eugeni.stepanov at gmail.com
Thu Jan 23 00:14:21 PST 2014


Author: eugenis
Date: Thu Jan 23 02:14:20 2014
New Revision: 199872

URL: http://llvm.org/viewvc/llvm-project?rev=199872&view=rev
Log:
[asan] Enable replacement new/delete on Android.

New/delete implementations in system libraries almost always are built without
frame pointers. As we switched to frame pointer based unwinder on ARM, they no
longer work for us, resulting in broken allocation/deallocation stacks.

Note that this does not work with statically linked
libstdc++/libc++/libstlport.

Modified:
    compiler-rt/trunk/lib/asan/asan_new_delete.cc

Modified: compiler-rt/trunk/lib/asan/asan_new_delete.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_new_delete.cc?rev=199872&r1=199871&r2=199872&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_new_delete.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_new_delete.cc Thu Jan 23 02:14:20 2014
@@ -29,9 +29,8 @@ void ReplaceOperatorsNewAndDelete() { }
 
 using namespace __asan;  // NOLINT
 
-// On Android new() goes through malloc interceptors.
-// See also https://code.google.com/p/address-sanitizer/issues/detail?id=131.
-#if !SANITIZER_ANDROID
+// This code has issues on OSX.
+// See https://code.google.com/p/address-sanitizer/issues/detail?id=131.
 
 // Fake std::nothrow_t to avoid including <new>.
 namespace std {
@@ -106,5 +105,3 @@ INTERCEPTOR(void, _ZdaPvRKSt9nothrow_t,
   OPERATOR_DELETE_BODY(FROM_NEW_BR);
 }
 #endif
-
-#endif





More information about the llvm-commits mailing list