[llvm-commits] [compiler-rt] r152945 - /compiler-rt/trunk/lib/asan/asan_interceptors.cc
Kostya Serebryany
kcc at google.com
Fri Mar 16 14:02:13 PDT 2012
Author: kcc
Date: Fri Mar 16 16:02:13 2012
New Revision: 152945
URL: http://llvm.org/viewvc/llvm-project?rev=152945&view=rev
Log:
[asan] added an assert in InitializeAsanInterceptors (it should be run just once)
Modified:
compiler-rt/trunk/lib/asan/asan_interceptors.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=152945&r1=152944&r2=152945&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_interceptors.cc Fri Mar 16 16:02:13 2012
@@ -635,6 +635,9 @@
// ---------------------- InitializeAsanInterceptors ---------------- {{{1
namespace __asan {
void InitializeAsanInterceptors() {
+ static bool was_called_once;
+ CHECK(was_called_once == false);
+ was_called_once = true;
// Intercept mem* functions.
CHECK(INTERCEPT_FUNCTION(memcmp));
CHECK(INTERCEPT_FUNCTION(memmove));
More information about the llvm-commits
mailing list