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

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

Issue 2211733002: Subzero: Improved quality of ASan error messages (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Replaced switch statements with table lookups 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
« no previous file with comments | « tests_lit/asan_tests/instrumentlocals.ll ('k') | tests_lit/asan_tests/realloc_shrink.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; Check that functions with multiple returns are correctly instrumented 1 ; Check that functions with multiple returns are correctly instrumented
2 2
3 ; REQUIRES: allow_dump 3 ; REQUIRES: allow_dump
4 4
5 ; RUN: %p2i -i %s --args -verbose=inst -threads=0 -fsanitize-address \ 5 ; RUN: %p2i -i %s --args -verbose=inst -threads=0 -fsanitize-address \
6 ; RUN: | FileCheck --check-prefix=DUMP %s 6 ; RUN: | FileCheck --check-prefix=DUMP %s
7 7
8 define internal void @ret_twice(i32 %condarg) { 8 define internal void @ret_twice(i32 %condarg) {
9 %local1 = alloca i8, i32 4, align 4 9 %local1 = alloca i8, i32 4, align 4
10 %local2 = alloca i8, i32 4, align 4 10 %local2 = alloca i8, i32 4, align 4
11 %cond = icmp ne i32 %condarg, 0 11 %cond = icmp ne i32 %condarg, 0
12 br i1 %cond, label %yes, label %no 12 br i1 %cond, label %yes, label %no
13 yes: 13 yes:
14 ret void 14 ret void
15 no: 15 no:
16 ret void 16 ret void
17 } 17 }
18 18
19 ; DUMP-LABEL: ================ Instrumented CFG ================ 19 ; DUMP-LABEL: ================ Instrumented CFG ================
20 ; DUMP-NEXT: define internal void @ret_twice(i32 %condarg) { 20 ; DUMP-NEXT: define internal void @ret_twice(i32 %condarg) {
21 ; DUMP-NEXT: __0: 21 ; DUMP-NEXT: __0:
22 ; DUMP-NEXT: %local1 = alloca i8, i32 64, align 8 22 ; DUMP-NEXT: %local1 = alloca i8, i32 64, align 8
23 ; DUMP-NEXT: %local2 = alloca i8, i32 64, align 8 23 ; DUMP-NEXT: %local2 = alloca i8, i32 64, align 8
24 ; DUMP-NEXT: %__$rz2 = alloca i8, i32 32, align 8 24 ; DUMP-NEXT: %__$rz2 = alloca i8, i32 32, align 8
25 ; DUMP-NEXT: call void @__asan_poison(i32 %__$rz2, i32 32) 25 ; DUMP-NEXT: call void @__asan_poison(i32 %__$rz2, i32 32, i32 -1)
26 ; DUMP-NEXT: %__$rz0 = add i32 %local1, 4 26 ; DUMP-NEXT: %__$rz0 = add i32 %local1, 4
27 ; DUMP-NEXT: call void @__asan_poison(i32 %__$rz0, i32 60) 27 ; DUMP-NEXT: call void @__asan_poison(i32 %__$rz0, i32 60, i32 -1)
28 ; DUMP-NEXT: %__$rz1 = add i32 %local2, 4 28 ; DUMP-NEXT: %__$rz1 = add i32 %local2, 4
29 ; DUMP-NEXT: call void @__asan_poison(i32 %__$rz1, i32 60) 29 ; DUMP-NEXT: call void @__asan_poison(i32 %__$rz1, i32 60, i32 -1)
30 ; DUMP-NEXT: %cond = icmp ne i32 %condarg, 0 30 ; DUMP-NEXT: %cond = icmp ne i32 %condarg, 0
31 ; DUMP-NEXT: br i1 %cond, label %yes, label %no 31 ; DUMP-NEXT: br i1 %cond, label %yes, label %no
32 ; DUMP-NEXT: yes: 32 ; DUMP-NEXT: yes:
33 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz0, i32 60) 33 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz0, i32 60)
34 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz1, i32 60) 34 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz1, i32 60)
35 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz2, i32 32) 35 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz2, i32 32)
36 ; DUMP-NEXT: ret void 36 ; DUMP-NEXT: ret void
37 ; DUMP-NEXT: no: 37 ; DUMP-NEXT: no:
38 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz0, i32 60) 38 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz0, i32 60)
39 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz1, i32 60) 39 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz1, i32 60)
40 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz2, i32 32) 40 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz2, i32 32)
41 ; DUMP-NEXT: ret void 41 ; DUMP-NEXT: ret void
42 ; DUMP-NEXT: } 42 ; DUMP-NEXT: }
OLDNEW
« no previous file with comments | « tests_lit/asan_tests/instrumentlocals.ll ('k') | tests_lit/asan_tests/realloc_shrink.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698