OLD | NEW |
1 ; Test to ensure that blacklisted functions are not instrumented and others are. | 1 ; Test to ensure that blacklisted functions are not instrumented and others are. |
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: -allow-externally-defined-symbols | FileCheck --check-prefix=DUMP %s | 6 ; RUN: -allow-externally-defined-symbols | FileCheck --check-prefix=DUMP %s |
7 | 7 |
8 declare external i32 @malloc(i32) | 8 declare external i32 @malloc(i32) |
9 declare external void @free(i32) | 9 declare external void @free(i32) |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 %heapvar = call i32 @malloc(i32 42) | 31 %heapvar = call i32 @malloc(i32 42) |
32 call void @free(i32 %heapvar) | 32 call void @free(i32 %heapvar) |
33 ret void | 33 ret void |
34 } | 34 } |
35 | 35 |
36 ; DUMP-LABEL: ================ Instrumented CFG ================ | 36 ; DUMP-LABEL: ================ Instrumented CFG ================ |
37 ; DUMP-NEXT: define internal void @func() { | 37 ; DUMP-NEXT: define internal void @func() { |
38 ; DUMP-NEXT: __0: | 38 ; DUMP-NEXT: __0: |
39 ; DUMP-NEXT: %local = alloca i8, i32 64, align 8 | 39 ; DUMP-NEXT: %local = alloca i8, i32 64, align 8 |
40 ; DUMP-NEXT: %__$rz1 = alloca i8, i32 32, align 8 | 40 ; DUMP-NEXT: %__$rz1 = alloca i8, i32 32, align 8 |
41 ; DUMP-NEXT: call void @__asan_poison(i32 %__$rz1, i32 32) | 41 ; DUMP-NEXT: call void @__asan_poison(i32 %__$rz1, i32 32, i32 -1) |
42 ; DUMP-NEXT: %__$rz0 = add i32 %local, 4 | 42 ; DUMP-NEXT: %__$rz0 = add i32 %local, 4 |
43 ; DUMP-NEXT: call void @__asan_poison(i32 %__$rz0, i32 60) | 43 ; DUMP-NEXT: call void @__asan_poison(i32 %__$rz0, i32 60, i32 -1) |
44 ; DUMP-NEXT: %heapvar = call i32 @__asan_malloc(i32 42) | 44 ; DUMP-NEXT: %heapvar = call i32 @__asan_malloc(i32 42) |
45 ; DUMP-NEXT: call void @__asan_free(i32 %heapvar) | 45 ; DUMP-NEXT: call void @__asan_free(i32 %heapvar) |
46 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz0, i32 60) | 46 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz0, i32 60) |
47 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz1, i32 32) | 47 ; DUMP-NEXT: call void @__asan_unpoison(i32 %__$rz1, i32 32) |
48 ; DUMP-NEXT: ret void | 48 ; DUMP-NEXT: ret void |
49 ; DUMP-NEXT: } | 49 ; DUMP-NEXT: } |
OLD | NEW |