[llvm-commits] [compiler-rt] r153180 - in /compiler-rt/trunk/lib/asan: asan_interceptors.cc asan_interceptors.h asan_mac.cc
Alexey Samsonov
samsonov at google.com
Wed Mar 21 05:42:02 PDT 2012
Author: samsonov
Date: Wed Mar 21 07:42:00 2012
New Revision: 153180
URL: http://llvm.org/viewvc/llvm-project?rev=153180&view=rev
Log:
[asan] merge mac-specific interceptors into one function
Modified:
compiler-rt/trunk/lib/asan/asan_interceptors.cc
compiler-rt/trunk/lib/asan/asan_interceptors.h
compiler-rt/trunk/lib/asan/asan_mac.cc
Modified: compiler-rt/trunk/lib/asan/asan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interceptors.cc?rev=153180&r1=153179&r2=153180&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_interceptors.cc Wed Mar 21 07:42:00 2012
@@ -705,9 +705,7 @@
// Some Mac-specific interceptors.
#if defined(__APPLE__)
- InitializeMacGCDInterceptors();
- // http://code.google.com/p/address-sanitizer/issues/detail?id=10
- PatchCFStringCreateCopy();
+ InitializeMacInterceptors();
#endif
if (FLAG_v > 0) {
Modified: compiler-rt/trunk/lib/asan/asan_interceptors.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interceptors.h?rev=153180&r1=153179&r2=153180&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interceptors.h (original)
+++ compiler-rt/trunk/lib/asan/asan_interceptors.h Wed Mar 21 07:42:00 2012
@@ -47,8 +47,7 @@
void InitializeAsanInterceptors();
#if defined(__APPLE__)
-void InitializeMacGCDInterceptors();
-void PatchCFStringCreateCopy();
+void InitializeMacInterceptors();
#endif // __APPLE__
} // namespace __asan
Modified: compiler-rt/trunk/lib/asan/asan_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_mac.cc?rev=153180&r1=153179&r2=153180&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_mac.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_mac.cc Wed Mar 21 07:42:00 2012
@@ -643,7 +643,8 @@
}
namespace __asan {
-void InitializeMacGCDInterceptors() {
+
+void InitializeMacInterceptors() {
CHECK(INTERCEPT_FUNCTION(dispatch_async_f));
CHECK(INTERCEPT_FUNCTION(dispatch_sync_f));
CHECK(INTERCEPT_FUNCTION(dispatch_after_f));
@@ -655,8 +656,6 @@
if (FLAG_v >= 2) {
CHECK(INTERCEPT_FUNCTION(pthread_workqueue_additem_np));
}
-}
-void PatchCFStringCreateCopy() {
// Normally CFStringCreateCopy should not copy constant CF strings.
// Replacing the default CFAllocator causes constant strings to be copied
// rather than just returned, which leads to bugs in big applications like
@@ -666,6 +665,7 @@
// non-constant before calling CFStringCreateCopy.
CHECK(INTERCEPT_FUNCTION(CFStringCreateCopy));
}
+
} // namespace __asan
#endif // __APPLE__
More information about the llvm-commits
mailing list