summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2013-01-22 09:14:54 +0000
committerAlexander Potapenko <glider@google.com>2013-01-22 09:14:54 +0000
commitcae42d23a6f2ef7ad6ea1093a6b3f5a1dd375bcf (patch)
tree4dfdc0531f9427545e2014d12a38ce22fd26c110 /compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc
parenta168f300735519e1b0619b36f4c3281121618aa3 (diff)
downloadbcm5719-llvm-cae42d23a6f2ef7ad6ea1093a6b3f5a1dd375bcf.tar.gz
bcm5719-llvm-cae42d23a6f2ef7ad6ea1093a6b3f5a1dd375bcf.zip
[ASan] Use dylib interposition to hook memory allocation in the dynamic runtime.
This CL drastically simplifies the way we're hooking the memory allocation routines in ASan on Mac by using dylib interposition to replace the main malloc_zone_* functions. This allows us to avoid replacing the default CFAllocator and drop the CF dependency at all. Committing this patch will result in the static runtime being broken. A follow-up CL will switch ASan to use the dynamic runtime library. llvm-svn: 173134
Diffstat (limited to 'compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc')
-rw-r--r--compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc b/compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc
index 18711843c4c..2d79c7a2d97 100644
--- a/compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc
+++ b/compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc
@@ -32,9 +32,7 @@ int main(int argc, char **argv) {
// CHECK-Linux: {{ #0 0x.* in .*malloc}}
// CHECK-Linux: {{ #1 0x.* in main .*strncpy-overflow.cc:}}[[@LINE-10]]
- // CHECK-Darwin: {{ #0 0x.* in .*mz_malloc.*}}
- // CHECK-Darwin: {{ #1 0x.* in malloc_zone_malloc.*}}
- // CHECK-Darwin: {{ #2 0x.* in malloc.*}}
- // CHECK-Darwin: {{ #3 0x.* in _?main .*strncpy-overflow.cc:}}[[@LINE-15]]
+ // CHECK-Darwin: {{ #0 0x.* in _?wrap_malloc.*}}
+ // CHECK-Darwin: {{ #1 0x.* in _?main .*strncpy-overflow.cc:}}[[@LINE-13]]
return short_buffer[8];
}
OpenPOWER on IntegriCloud