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

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


  LGTM with two nits


================
Comment at: lib/asan/asan_allocator2.cc:497
@@ -502,1 +496,3 @@
   AsanChunk *m = reinterpret_cast<AsanChunk *>(chunk_beg);
+  // FIXME: if the free hook produces an ASan report (e.g. due to a bug),
+  // printing the report may crash as the AsanChunk free-related fields have
----------------
This comment should be removed.

================
Comment at: lib/asan/asan_allocator2.cc:522
@@ -527,1 +521,3 @@
+    // If realloc() races with free(), we may start copying freed memory.
+    // However, we will return racy double-free later anyway.
     REAL(memcpy)(new_ptr, old_ptr, memcpy_size);
----------------
s/return/report/


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



More information about the llvm-commits mailing list