[llvm-commits] [PATCH] [ASan] Use dylib interposition to hook memory allocation in the dynamic runtime.
Alexey Samsonov
samsonov at google.com
Mon Jan 21 22:55:03 PST 2013
LGTM
================
Comment at: asan_malloc_mac.cc:46
@@ +45,3 @@
+ malloc_zone_t *new_zone =
+ (malloc_zone_t*)asan_malloc(sizeof(malloc_zone_t), &stack);
+ internal_memcpy(new_zone, &asan_zone, sizeof(malloc_zone_t));
----------------
I think lint would advice you to prefer sizeof(asan_zone)
================
Comment at: asan_malloc_mac.cc:86
@@ +85,3 @@
+ internal_snprintf(new_name.data(), buflen, "asan-%s", name);
+ new_name.data()[buflen - 1] = '\0';
+ name = new_name.data();
----------------
I think that internal_snprintf() adds a trailing \0
================
Comment at: lit_tests/malloc_delete_mismatch.cc:1
@@ -1,2 @@
-// Check that we detect malloc/delete mismatch only if the approptiate flag
-// is set.
----------------
Did you move this file somewhere?
http://llvm-reviews.chandlerc.com/D216
More information about the llvm-commits
mailing list