[llvm-commits] [compiler-rt] r157569 - in /compiler-rt/trunk/lib: asan/output_tests/interception_malloc_test-linux.cc asan/output_tests/interception_test-linux.cc interception/interception.h tsan/rtl/tsan_rtl_report.cc
Dmitry Vyukov
dvyukov at google.com
Mon May 28 00:47:35 PDT 2012
Author: dvyukov
Date: Mon May 28 02:47:35 2012
New Revision: 157569
URL: http://llvm.org/viewvc/llvm-project?rev=157569&view=rev
Log:
asan/tsan: rename interceptors from __xsan_xxx to __interceptor_xxx
Modified:
compiler-rt/trunk/lib/asan/output_tests/interception_malloc_test-linux.cc
compiler-rt/trunk/lib/asan/output_tests/interception_test-linux.cc
compiler-rt/trunk/lib/interception/interception.h
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc
Modified: compiler-rt/trunk/lib/asan/output_tests/interception_malloc_test-linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/output_tests/interception_malloc_test-linux.cc?rev=157569&r1=157568&r2=157569&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/output_tests/interception_malloc_test-linux.cc (original)
+++ compiler-rt/trunk/lib/asan/output_tests/interception_malloc_test-linux.cc Mon May 28 02:47:35 2012
@@ -2,10 +2,10 @@
#include <stdio.h>
#include <unistd.h>
-extern "C" void *__xsan_malloc(size_t size);
+extern "C" void *__interceptor_malloc(size_t size);
extern "C" void *malloc(size_t size) {
write(2, "malloc call\n", sizeof("malloc call\n") - 1);
- return __xsan_malloc(size);
+ return __interceptor_malloc(size);
}
int main() {
Modified: compiler-rt/trunk/lib/asan/output_tests/interception_test-linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/output_tests/interception_test-linux.cc?rev=157569&r1=157568&r2=157569&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/output_tests/interception_test-linux.cc (original)
+++ compiler-rt/trunk/lib/asan/output_tests/interception_test-linux.cc Mon May 28 02:47:35 2012
@@ -1,10 +1,10 @@
#include <stdlib.h>
#include <stdio.h>
-extern "C" long __xsan_strtol(const char *nptr, char **endptr, int base);
+extern "C" long __interceptor_strtol(const char *nptr, char **endptr, int base);
extern "C" long strtol(const char *nptr, char **endptr, int base) {
fprintf(stderr, "my_strtol_interceptor\n");
- return __xsan_strtol(nptr, endptr, base);
+ return __interceptor_strtol(nptr, endptr, base);
}
int main() {
Modified: compiler-rt/trunk/lib/interception/interception.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/interception/interception.h?rev=157569&r1=157568&r2=157569&view=diff
==============================================================================
--- compiler-rt/trunk/lib/interception/interception.h (original)
+++ compiler-rt/trunk/lib/interception/interception.h Mon May 28 02:47:35 2012
@@ -65,8 +65,8 @@
// with same names in our library and then obtain the real function pointers
// using dlsym().
// There is one complication. A user may also intercept some of the functions
-// we intercept. To resolve this we declare our interceptors with __xsan_
-// prefix, and then make actual interceptors weak aliases to __xsan_
+// we intercept. To resolve this we declare our interceptors with __interceptor_
+// prefix, and then make actual interceptors weak aliases to __interceptor_
// functions.
// This is not so on Mac OS, where the two-level namespace makes
// our replacement functions invisible to other libraries. This may be overcomed
@@ -93,12 +93,12 @@
# endif
# define DECLARE_WRAPPER(ret_type, convention, func, ...)
#else
-# define WRAP(x) __xsan_ ## x
-# define WRAPPER_NAME(x) "__xsan_" #x
+# define WRAP(x) __interceptor_ ## x
+# define WRAPPER_NAME(x) "__interceptor_" #x
# define INTERCEPTOR_ATTRIBUTE __attribute__((visibility("default")))
# define DECLARE_WRAPPER(ret_type, convention, func, ...) \
extern "C" ret_type convention func(__VA_ARGS__) \
- __attribute__((weak, alias("__xsan_" #func), visibility("default")))
+ __attribute__((weak, alias("__interceptor_" #func), visibility("default")))
#endif
#define PTR_TO_REAL(x) real_##x
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc?rev=157569&r1=157568&r2=157569&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc Mon May 28 02:47:35 2012
@@ -32,7 +32,7 @@
static void StackStripMain(ReportStack *stack) {
ReportStack *last_frame = 0;
ReportStack *last_frame2 = 0;
- const char *prefix = "__xsan_";
+ const char *prefix = "__interceptor_";
uptr prefix_len = internal_strlen(prefix);
const char *path_prefix = flags()->strip_path_prefix;
uptr path_prefix_len = internal_strlen(path_prefix);
More information about the llvm-commits
mailing list