[PATCH] D23647: [asan] Extend test

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 11:25:28 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL279109: [asan] Extend test (authored by vitalybuka).

Changed prior to commit:
  https://reviews.llvm.org/D23647?vs=68485&id=68580#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D23647

Files:
  llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll

Index: llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll
===================================================================
--- llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll
+++ llvm/trunk/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.68580.patch
Type: text/x-patch
Size: 2584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160818/2ac6481b/attachment.bin>


More information about the llvm-commits mailing list