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

Unified Diff: tests_lit/asan_tests/startinitcall.ll

Issue 2068593003: Implemented linking to a dummy ASan runtime (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fixes in szbuild.py 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests_lit/asan_tests/globalredzones.ll ('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/startinitcall.ll
diff --git a/tests_lit/asan_tests/startinitcall.ll b/tests_lit/asan_tests/startinitcall.ll
new file mode 100644
index 0000000000000000000000000000000000000000..0e225d4d5703252c44d6ec167ac5709fccec5983
--- /dev/null
+++ b/tests_lit/asan_tests/startinitcall.ll
@@ -0,0 +1,27 @@
+; Test for a call to __asan_init in _start
+
+; REQUIRES: allow_dump
+
+; RUN: %p2i -i %s --args -verbose=inst -threads=0 -fsanitize-address \
+; RUN: | FileCheck --check-prefix=DUMP %s
+
+; notStart() should not be instrumented
+define internal void @notStart() {
+ ret void
+}
+
+; DUMP-LABEL: ================ Instrumented CFG ================
+; DUMP-NEXT: define internal void @notStart(
Karl 2016/06/15 14:19:28 Wouldn't be safer to make this the DUMP-LABEL entr
tlively 2016/06/15 16:32:00 Done.
+; DUMP-NEXT: __0:
+; DUMP-NOT: __asan_init()
+; DUMP: }
+
+; _start() should be instrumented
+define void @_start() {
+ ret void
+}
+
+; DUMP-LABEL: ================ Instrumented CFG ================
+; DUMP-NEXT: define void @_start(
Karl 2016/06/15 14:19:28 Same here.
tlively 2016/06/15 16:32:00 Done.
+; DUMP-NEXT: __0:
+; DUMP-NEXT: call void @__asan_init()
« no previous file with comments | « tests_lit/asan_tests/globalredzones.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698