Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Side by Side Diff: tests_lit/asan_tests/errors.ll

Issue 2194853003: Subzero: Implemented codegen for poisoning and unpoisoning stack redzones (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 ; Verify that ASan properly catches and reports bugs 1 ; Verify that ASan properly catches and reports bugs
2 2
3 ; REQUIRES: no_minimal_build 3 ; REQUIRES: no_minimal_build
4 4
5 ; check with a one off the end local access 5 ; check with a one off the end local access
6 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \ 6 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \
7 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \ 7 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \
8 ; RUN: %t.pexe -o %t && %t 2>&1 | FileCheck %s 8 ; RUN: %t.pexe -o %t && %t 2>&1 | FileCheck %s
9 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \
10 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols -O2 \
11 ; RUN: %t.pexe -o %t && %t 2>&1 | FileCheck %s
9 12
10 ; check with a many off the end local access 13 ; check with a many off the end local access
11 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \ 14 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \
12 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \ 15 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \
13 ; RUN: %t.pexe -o %t && %t 1 2>&1 | FileCheck %s 16 ; RUN: %t.pexe -o %t && %t 1 2>&1 | FileCheck %s
17 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \
18 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols -O2 \
19 ; RUN: %t.pexe -o %t && %t 1 2>&1 | FileCheck %s
14 20
15 ; check with a one before the front local access 21 ; check with a one before the front local access
16 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \ 22 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \
17 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \ 23 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \
18 ; RUN: %t.pexe -o %t && %t 1 2 2>&1 | FileCheck %s 24 ; RUN: %t.pexe -o %t && %t 1 2 2>&1 | FileCheck %s
25 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \
26 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols -O2\
27 ; RUN: %t.pexe -o %t && %t 1 2 2>&1 | FileCheck %s
19 28
20 ; check with a one off the end global access 29 ; check with a one off the end global access
21 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \ 30 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \
22 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \ 31 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \
23 ; RUN: %t.pexe -o %t && %t 1 2 3 2>&1 | FileCheck %s 32 ; RUN: %t.pexe -o %t && %t 1 2 3 2>&1 | FileCheck %s
33 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \
34 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols -O2 \
35 ; RUN: %t.pexe -o %t && %t 1 2 3 2>&1 | FileCheck %s
24 36
25 ; check with a many off the end global access 37 ; check with a many off the end global access
26 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \ 38 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \
27 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \ 39 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \
28 ; RUN: %t.pexe -o %t && %t 1 2 3 4 2>&1 | FileCheck %s 40 ; RUN: %t.pexe -o %t && %t 1 2 3 4 2>&1 | FileCheck %s
41 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \
42 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols -O2 \
43 ; RUN: %t.pexe -o %t && %t 1 2 3 4 2>&1 | FileCheck %s
29 44
30 ; check with a one before the front global access 45 ; check with a one before the front global access
31 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \ 46 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \
32 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \ 47 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \
33 ; RUN: %t.pexe -o %t && %t 1 2 3 4 5 2>&1 | FileCheck %s 48 ; RUN: %t.pexe -o %t && %t 1 2 3 4 5 2>&1 | FileCheck %s
34 49 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \
50 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols -O2 \
51 ; RUN: %t.pexe -o %t && %t 1 2 3 4 5 2>&1 | FileCheck %s
35 52
36 declare external void @exit(i32) 53 declare external void @exit(i32)
37 54
38 ; A global array 55 ; A global array
39 @array = internal constant [12 x i8] zeroinitializer 56 @array = internal constant [12 x i8] zeroinitializer
40 57
41 define void @access(i32 %is_local_i, i32 %err) { 58 define void @access(i32 %is_local_i, i32 %err) {
42 ; get the base pointer to either the local or global array 59 ; get the base pointer to either the local or global array
43 %local = alloca i8, i32 12, align 1 60 %local = alloca i8, i32 12, align 1
44 %global = bitcast [12 x i8]* @array to i8* 61 %global = bitcast [12 x i8]* @array to i8*
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 neg_global: 112 neg_global:
96 ; Access one before the beginning of a global 113 ; Access one before the beginning of a global
97 call void @access(i32 0, i32 -1) 114 call void @access(i32 0, i32 -1)
98 br label %error 115 br label %error
99 error: 116 error:
100 call void @exit(i32 1) 117 call void @exit(i32 1)
101 unreachable 118 unreachable
102 } 119 }
103 120
104 ; CHECK: Illegal access of 1 bytes at 121 ; CHECK: Illegal access of 1 bytes at
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698