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

Unified Diff: tests_lit/asan_tests/calloc.ll

Issue 2145213002: Subzero: implemented wrapper script to replace calls to calloc() (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Updated command examples 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
« pydir/sz-clang.py ('K') | « tests_lit/asan_tests/Input/calloc.c ('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/calloc.ll
diff --git a/tests_lit/asan_tests/calloc.ll b/tests_lit/asan_tests/calloc.ll
new file mode 100644
index 0000000000000000000000000000000000000000..e80a73fddc66ecdb4a5a9f1ba9b47abd49f7784e
--- /dev/null
+++ b/tests_lit/asan_tests/calloc.ll
@@ -0,0 +1,11 @@
+; Test that sz-clang.py successfully replaced calls to calloc
+
+; RUN: %S/../../pydir/sz-clang.py -fsanitize-address %S/Input/calloc.c -E \
+; RUN: | FileCheck %s
+
+; CHECK-LABEL: int main(void) {
+; CHECK-NEXT: void *buf = (__asan_dummy_calloc(14, sizeof(int)));
+; CHECK-NEXT: strcpy(buf, "Hello, world!");
+; CHECK-NEXT: printf("%s\n", buf);
+; CHECK-NEXT: free(buf);
+; CHECK-NEXT: }
« pydir/sz-clang.py ('K') | « tests_lit/asan_tests/Input/calloc.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698