Index: runtime/szrt_asan.c |
diff --git a/runtime/szrt_asan.c b/runtime/szrt_asan.c |
index db020f5968c856c2c9416a40cfc684be6d54e50f..47b6abc8c3a054e623cfbecb065c0cf5c08740a8 100644 |
--- a/runtime/szrt_asan.c |
+++ b/runtime/szrt_asan.c |
@@ -15,7 +15,8 @@ |
/// |
//===----------------------------------------------------------------------===// |
-#include <stdio.h> |
+#include <stddef.h> |
+#include <stdlib.h> |
// TODO(tlively): Define and implement this library |
void __asan_init(void) { |
@@ -24,6 +25,16 @@ void __asan_init(void) { |
} |
void __asan_check(void *addr, int size) { |
- printf("Check access of %p of size %d\n", addr, size); |
+ printf("Check %d bytes at %p\n", size, addr); |
return; |
} |
+ |
+void *__asan_malloc(size_t size) { |
+ printf("malloc() called with size %d\n", size); |
+ return malloc(size); |
+} |
+ |
+void __asan_free(void *ptr) { |
+ printf("free() called on %p\n", ptr); |
+ free(ptr); |
+} |