[PATCH] Call __asan_free_hook() before marking the chunk quarantinned

Timur Iskhodzhanov timurrrr at google.com
Tue Jun 4 04:02:03 PDT 2013



================
Comment at: lib/asan/asan_allocator2.cc:519
@@ -525,1 +518,3 @@
   if (new_ptr) {
+    ASAN_FREE_HOOK(old_ptr);
+    // Must mark the chunk as quarantined before any changes to its metadata.
----------------
This should be after `memcpy` as the user's hook may fill the buffer with 0xDEADBEEF


http://llvm-reviews.chandlerc.com/D913

BRANCH
  svn

ARCANIST PROJECT
  compiler-rt



More information about the llvm-commits mailing list