[PATCH] D23647: [asan] Extend test
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 17 23:54:07 PDT 2016
vitalybuka created this revision.
vitalybuka added a reviewer: eugenis.
vitalybuka added a subscriber: llvm-commits.
PR27453
https://reviews.llvm.org/D23647
Files:
test/Instrumentation/AddressSanitizer/stack-poisoning.ll
Index: test/Instrumentation/AddressSanitizer/stack-poisoning.ll
===================================================================
--- test/Instrumentation/AddressSanitizer/stack-poisoning.ll
+++ test/Instrumentation/AddressSanitizer/stack-poisoning.ll
@@ -14,29 +14,59 @@
; CHECK-UAR-LABEL: Bar
; CHECK-UAR: load i32, i32* @__asan_option_detect_stack_use_after_return
; CHECK-UAR: label
-; CHECK-UAR: call i64 @__asan_stack_malloc_1
+; CHECK-UAR: call i64 @__asan_stack_malloc_4
; CHECK-UAR: label
+; CHECK-UAR: store i64 -1007680412564983311
+; CHECK-UAR: store i64 72057598113936114
+; CHECK-UAR: store i64 4076008178
+; CHECK-UAR: store i64 -868082074072645632
+; CHECK-UAR: store i32 -202116109
+; CHECK-UAR: call void @Foo
+; CHECK-UAR: call void @Foo
; CHECK-UAR: call void @Foo
; If LocalStackBase != OrigStackBase
; CHECK-UAR: label
; Then Block: poison the entire frame.
; CHECK-UAR: store i64 -723401728380766731
; CHECK-UAR: store i64 -723401728380766731
+ ; CHECK-UAR: store i64 -723401728380766731
+ ; CHECK-UAR: store i64 -723401728380766731
+ ; CHECK-UAR: store i64 -723401728380766731
+ ; CHECK-UAR: store i64 -723401728380766731
+ ; CHECK-UAR: store i64 -723401728380766731
+ ; CHECK-UAR: store i64 -723401728380766731
+ ; CHECK-UAR: store i64 -723401728380766731
+ ; CHECK-UAR: store i64 -723401728380766731
+ ; CHECK-UAR: store i64 -723401728380766731
+ ; CHECK-UAR: store i64 -723401728380766731
+ ; CHECK-UAR: store i64 -723401728380766731
+ ; CHECK-UAR: store i64 -723401728380766731
+ ; CHECK-UAR: store i64 -723401728380766731
+ ; CHECK-UAR: store i64 -723401728380766731
; CHECK-UAR: store i8 0
; CHECK-UAR-NOT: store
; CHECK-UAR: label
; Else Block: no UAR frame. Only unpoison the redzones.
; CHECK-UAR: store i64 0
+ ; CHECK-UAR: store i64 0
+ ; CHECK-UAR: store i64 0
+ ; CHECK-UAR: store i64 0
; CHECK-UAR: store i32 0
; CHECK-UAR-NOT: store
; CHECK-UAR: label
; Done, no more stores.
; CHECK-UAR-NOT: store
; CHECK-UAR: ret void
%x = alloca [20 x i8], align 16
- %arraydecay = getelementptr inbounds [20 x i8], [20 x i8]* %x, i64 0, i64 0
- call void @Foo(i8* %arraydecay)
+ %y = alloca [25 x i8], align 1
+ %z = alloca [500 x i8], align 1
+ %xx = getelementptr inbounds [20 x i8], [20 x i8]* %x, i64 0, i64 0
+ call void @Foo(i8* %xx)
+ %yy = getelementptr inbounds [25 x i8], [25 x i8]* %y, i64 0, i64 0
+ call void @Foo(i8* %yy)
+ %zz = getelementptr inbounds [500 x i8], [500 x i8]* %z, i64 0, i64 0
+ call void @Foo(i8* %zz)
ret void
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23647.68485.patch
Type: text/x-patch
Size: 2551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160818/79842415/attachment.bin>
More information about the llvm-commits
mailing list