[llvm-commits] [PATCH] [ASan] Use dylib interposition to hook memory allocation in the dynamic runtime.
Alexander Potapenko
glider at google.com
Wed Dec 19 04:29:54 PST 2012
================
Comment at: asan_malloc_mac.cc:87
@@ +86,3 @@
+ }
+ InternalScopedBuffer<char> new_name(buflen);
+ if (buflen) {
----------------
Alexey Samsonov wrote:
> Will this work for buflen == 0?
Refactored the code so that buflen is always > 0.
================
Comment at: asan_malloc_mac.cc:89
@@ +88,3 @@
+ if (buflen) {
+ internal_strncpy(new_name.data(), zone_prefix, buflen);
+ internal_strncat(new_name.data(), name, buflen);
----------------
Alexey Samsonov wrote:
> We have internal_snprintf
Done, thanks.
http://llvm-reviews.chandlerc.com/D216
More information about the llvm-commits
mailing list