| 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;
|
|
|