Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: syzygy/agent/asan/heap_managers/block_heap_manager.h

Issue 2383793003: [SyzyAsan] More careful handling when freeing corrupt blocks. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | syzygy/agent/asan/heap_managers/block_heap_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: syzygy/agent/asan/heap_managers/block_heap_manager.h
diff --git a/syzygy/agent/asan/heap_managers/block_heap_manager.h b/syzygy/agent/asan/heap_managers/block_heap_manager.h
index a445522f58387bd4f075d3106bc324494a7495ee..ad0d0752907b48cbae7519ea38d108dea14c9a98 100644
--- a/syzygy/agent/asan/heap_managers/block_heap_manager.h
+++ b/syzygy/agent/asan/heap_managers/block_heap_manager.h
@@ -294,7 +294,7 @@ class BlockHeapManager : public HeapManagerInterface {
bool FreeUnguardedAlloc(HeapId heap_id, void* alloc);
// Clears the metadata of a corrupt block. After calling this function the
- // block can safely be passed to FreeBlock.
+ // block can safely be passed to FreeBlock, but only if heap_id is non-zero.
// @param block_info The information about this block.
void ClearCorruptBlockMetadata(BlockInfo* block_info);
@@ -362,6 +362,11 @@ class BlockHeapManager : public HeapManagerInterface {
// @returns the thread ID.
base::PlatformThreadId GetDeferredFreeThreadId();
+ // Helper function for finding the heap ID associated with a corrupt block.
+ // This is best effort, and can return 0 when no heap can be found with
+ // certainty.
+ HeapId GetCorruptBlockHeapId(const BlockInfo* block_info);
+
// The shadow memory that is notified by all activity in this heap manager.
Shadow* shadow_;
« no previous file with comments | « no previous file | syzygy/agent/asan/heap_managers/block_heap_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698