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

Unified Diff: tests_lit/asan_tests/func_ptr.ll

Issue 2145063003: Updates in preparation of wrapper script (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: minor fix to test 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceASanInstrumentation.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/asan_tests/func_ptr.ll
diff --git a/tests_lit/asan_tests/func_ptr.ll b/tests_lit/asan_tests/func_ptr.ll
new file mode 100644
index 0000000000000000000000000000000000000000..53d89b9b52f782ca7872f38857459435bf67ebca
--- /dev/null
+++ b/tests_lit/asan_tests/func_ptr.ll
@@ -0,0 +1,25 @@
+; Test that calls made through pointers are unchanged by ASan
+
+; REQUIRES: allow_dump
+
+; RUN: %p2i -i %s --args -verbose=inst -threads=0 -fsanitize-address \
+; RUN: | FileCheck --check-prefix=DUMP %s
+
+define internal i32 @caller(i32 %callee_addr, i32 %arg) {
+ %callee = inttoptr i32 %callee_addr to i32 (i32)*
+ %result = call i32 %callee(i32 %arg)
+ ret i32 %result
+}
+
+; DUMP-LABEL: ================ Initial CFG ================
+; DUMP-NEXT: define internal i32 @caller(i32 %callee_addr, i32 %arg) {
+; DUMP-NEXT: __0:
+; DUMP-NEXT: %result = call i32 %callee_addr(i32 %arg)
+; DUMP-NEXT: ret i32 %result
+; DUMP-NEXT: }
+; DUMP-LABEL: ================ Instrumented CFG ================
+; DUMP-NEXT: define internal i32 @caller(i32 %callee_addr, i32 %arg) {
+; DUMP-NEXT: __0:
+; DUMP-NEXT: %result = call i32 %callee_addr(i32 %arg)
+; DUMP-NEXT: ret i32 %result
+; DUMP-NEXT: }
« no previous file with comments | « src/IceASanInstrumentation.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698