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

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

Issue 2079723002: Instrumented malloc and free with dummy functions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 6 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
« src/IceASanInstrumentation.cpp ('K') | « src/IceInstrumentation.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; Test that calls to malloc() and free() are replaced
2
3 ; REQUIRES: allow_dump
4
5 ; RUN: %p2i -i %s --args -verbose=inst -threads=0 -fsanitize-address \
6 ; RUN: --allow-externally-defined-symbols | FileCheck --check-prefix=DUMP %s
7
8 declare external i32 @malloc(i32)
9 declare external void @free(i32)
10
11 define internal void @func() {
12 %ptr = call i32 @malloc(i32 42)
13 call void @free(i32 %ptr)
14 ret void
15 }
16
17 ; DUMP-LABEL: ================ Instrumented CFG ================
18 ; DUMP-NEXT: define internal void @func() {
19 ; DUMP-NEXT: __0:
20 ; DUMP-NEXT: %ptr = call i32 @__asan_malloc(i32 42)
21 ; DUMP-NEXT: call void @__asan_free(i32 %ptr)
22 ; DUMP-NEXT: ret void
23 ; DUMP-NEXT: }
OLDNEW
« src/IceASanInstrumentation.cpp ('K') | « src/IceInstrumentation.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698