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

Unified Diff: tests_lit/asan_tests/Input/calloc.c

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: Addressed comments and added error testing 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
Index: tests_lit/asan_tests/Input/calloc.c
diff --git a/tests_lit/asan_tests/Input/calloc.c b/tests_lit/asan_tests/Input/calloc.c
new file mode 100644
index 0000000000000000000000000000000000000000..16dd6d7aca11a40745263e98cf6ee78878f9dd7b
--- /dev/null
+++ b/tests_lit/asan_tests/Input/calloc.c
@@ -0,0 +1,10 @@
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+int main(void) {
+ void *buf = calloc(14, sizeof(int));
+ strcpy(buf, "Hello, world!");
+ printf("%s\n", buf);
+ free(buf);
+}

Powered by Google App Engine
This is Rietveld 408576698