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

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

Issue 2128643002: Fixed instruction corruption bug for multiple returns. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 5 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
(Empty)
1 ; Check that functions with multiple returns are correctly instrumented
2
3 ; REQUIRES: allow_dump
4
5 ; RUN: %p2i -i %s --args -verbose=inst -threads=0 -fsanitize-address \
6 ; RUN: | FileCheck --check-prefix=DUMP %s
7
8 define internal void @ret_twice(i32 %condarg) {
9 %local1 = alloca i8, i32 4, align 4
10 %local2 = alloca i8, i32 4, align 4
11 %cond = icmp ne i32 %condarg, 0
12 br i1 %cond, label %yes, label %no
13 yes:
14 ret void
15 no:
16 ret void
17 }
18
19 ; DUMP-LABEL: ================ Instrumented CFG ================
20 ; DUMP-NEXT: define internal void @ret_twice(i32 %condarg) {
21 ; DUMP-NEXT: __0:
22 ; DUMP-NEXT: %local1 = 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
25 ; DUMP-NEXT: call void @__asan_poison(i32 %__$rz2, i32 32)
26 ; DUMP-NEXT: %__$rz0 = add i32 %local1, 4
27 ; DUMP-NEXT: call void @__asan_poison(i32 %__$rz0, i32 60)
28 ; DUMP-NEXT: %__$rz1 = add i32 %local2, 4
29 ; DUMP-NEXT: call void @__asan_poison(i32 %__$rz1, i32 60)
30 ; DUMP-NEXT: %cond = icmp ne i32 %condarg, 0
31 ; DUMP-NEXT: br i1 %cond, label %yes, label %no
32 ; DUMP-NEXT: yes:
33 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz0, i32 60)
34 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz1, i32 60)
35 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz2, i32 32)
36 ; DUMP-NEXT: ret void
37 ; DUMP-NEXT: no:
38 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz0, i32 60)
39 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz1, i32 60)
40 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz2, i32 32)
41 ; DUMP-NEXT: ret void
42 ; DUMP-NEXT: }
OLDNEW
« src/IceASanInstrumentation.cpp ('K') | « src/IceASanInstrumentation.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698