[compiler-rt] r200749 - [ASan] Replace the call to "vname" with "WRAP(vname)" in FORMAT_INTERCEPTOR_IMPL

Alexander Potapenko glider at google.com
Tue Feb 4 01:35:10 PST 2014


Author: glider
Date: Tue Feb  4 03:35:09 2014
New Revision: 200749

URL: http://llvm.org/viewvc/llvm-project?rev=200749&view=rev
Log:
[ASan] Replace the call to "vname" with "WRAP(vname)" in FORMAT_INTERCEPTOR_IMPL
It's incorrect to call the function by its name in the interceptor, because that means WRAP(vname) on Linux and REAL(vname) on OSX.

This patch fixes asan/lit_tests/TestCases/printf-3.c on Mac.

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc?rev=200749&r1=200748&r2=200749&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc Tue Feb  4 03:35:09 2014
@@ -579,7 +579,7 @@ INTERCEPTOR(char *, strptime, char *s, c
     va_list ap;                                                                \
     va_start(ap, format);                                                      \
     COMMON_INTERCEPTOR_ENTER(ctx, vname, __VA_ARGS__, ap);                     \
-    int res = vname(__VA_ARGS__, ap);                                          \
+    int res = WRAP(vname)(__VA_ARGS__, ap);                                    \
     va_end(ap);                                                                \
     return res;                                                                \
   }





More information about the llvm-commits mailing list