diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-07-16 10:01:02 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-07-16 10:01:02 +0000 |
commit | 349f14c72cbcd3c50091d20a874967aca5f2f746 (patch) | |
tree | 7c7e2bfc7763da9c9ddbe86a375a0438199d1384 /test/Instrumentation/AddressSanitizer/basic.ll | |
parent | c3c8db9d25e69083cec0c2d4a01735cd9e01269f (diff) | |
download | llvm-349f14c72cbcd3c50091d20a874967aca5f2f746.tar.gz llvm-349f14c72cbcd3c50091d20a874967aca5f2f746.tar.bz2 llvm-349f14c72cbcd3c50091d20a874967aca5f2f746.tar.xz |
Revert r160254 temporarily.
It turns out that ASan relied on the at-the-end block insertion order to
(purely by happenstance) disable some LLVM optimizations, which in turn
start firing when the ordering is made more "normal". These
optimizations in turn merge many of the instrumentation reporting calls
which breaks the return address based error reporting in ASan.
We're looking at several different options for fixing this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160256 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation/AddressSanitizer/basic.ll')
-rw-r--r-- | test/Instrumentation/AddressSanitizer/basic.ll | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/test/Instrumentation/AddressSanitizer/basic.ll b/test/Instrumentation/AddressSanitizer/basic.ll index 15b51d410a..e80cfeef12 100644 --- a/test/Instrumentation/AddressSanitizer/basic.ll +++ b/test/Instrumentation/AddressSanitizer/basic.ll @@ -16,6 +16,11 @@ define i32 @test_load(i32* %a) address_safety { ; CHECK: icmp ne i8 ; CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}} ; +; The actual load comes next because ASan adds the last instrumentation block +; to the end of the function. +; CHECK: %tmp1 = load i32* %a +; CHECK: ret i32 %tmp1 +; ; First instrumentation block refines the shadow test. ; CHECK: and i64 %[[LOAD_ADDR]], 7 ; CHECK: add i64 %{{.*}}, 3 @@ -23,13 +28,9 @@ define i32 @test_load(i32* %a) address_safety { ; CHECK: icmp sge i8 %{{.*}}, %[[LOAD_SHADOW]] ; CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}} ; -; Second instrumentation block reports the error. +; Final instrumentation block reports the error. ; CHECK: call void @__asan_report_load4(i64 %[[LOAD_ADDR]]) noreturn ; CHECK: unreachable -; -; Finally the instrumented load. -; CHECK: %tmp1 = load i32* %a -; CHECK: ret i32 %tmp1 entry: %tmp1 = load i32* %a @@ -47,6 +48,11 @@ define void @test_store(i32* %a) address_safety { ; CHECK: icmp ne i8 ; CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}} ; +; The actual store comes next because ASan adds the last instrumentation block +; to the end of the function. +; CHECK: store i32 42, i32* %a +; CHECK: ret void +; ; First instrumentation block refines the shadow test. ; CHECK: and i64 %[[STORE_ADDR]], 7 ; CHECK: add i64 %{{.*}}, 3 @@ -54,13 +60,9 @@ define void @test_store(i32* %a) address_safety { ; CHECK: icmp sge i8 %{{.*}}, %[[STORE_SHADOW]] ; CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}} ; -; Second instrumentation block reports the error. +; Final instrumentation block reports the error. ; CHECK: call void @__asan_report_store4(i64 %[[STORE_ADDR]]) noreturn ; CHECK: unreachable -; -; Finally the instrumented store. -; CHECK: store i32 42, i32* %a -; CHECK: ret void entry: store i32 42, i32* %a |