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

Unified Diff: runtime/szrt_asan.c

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 | « pydir/utils.py ('k') | src/IceASanInstrumentation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/szrt_asan.c
diff --git a/runtime/szrt_asan.c b/runtime/szrt_asan.c
index f8608bb4421945ab3b16b2a85df6535780a94479..449226b69bdc3dff023f416669838d9d9832854e 100644
--- a/runtime/szrt_asan.c
+++ b/runtime/szrt_asan.c
@@ -23,6 +23,7 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <sys/mman.h>
#define RZ_SIZE (32)
@@ -153,6 +154,13 @@ void *__asan_malloc(size_t size) {
return ret;
}
+void *__asan_calloc(size_t nmemb, size_t size) {
+ size_t alloc_size = nmemb * size;
+ void *ret = __asan_malloc(alloc_size);
+ memset(ret, 0, alloc_size);
+ return ret;
+}
+
void __asan_free(char *ptr) {
DUMP("free() called on %p\n", ptr);
void *rz_left = ptr - RZ_SIZE;
« no previous file with comments | « pydir/utils.py ('k') | src/IceASanInstrumentation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698