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

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

Issue 2538523003: Don't try to support allocs > 2GB (Closed)
Patch Set: Created 4 years, 1 month 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 | no next file » | 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.cc
diff --git a/syzygy/agent/asan/heap_managers/block_heap_manager.cc b/syzygy/agent/asan/heap_managers/block_heap_manager.cc
index da73c5691df08da21e80305f68a05daf2bfa3dd0..187ee031ff986295534f8979845503cd8aa06103 100644
--- a/syzygy/agent/asan/heap_managers/block_heap_manager.cc
+++ b/syzygy/agent/asan/heap_managers/block_heap_manager.cc
@@ -236,11 +236,10 @@ void* BlockHeapManager::Allocate(HeapId heap_id, uint32_t bytes) {
}
}
- // The allocation might fail because its size exceed the maximum size that
- // we can represent in the BlockHeader structure, try to do an unguarded
- // allocation.
+ // The allocation can fail if we're out of memory or if the size exceed the
+ // maximum allocation size.
if (alloc == nullptr)
- return DoUnguardedAllocation(GetHeapFromId(heap_id), shadow_, bytes);
+ return nullptr;
DCHECK_NE(static_cast<void*>(nullptr), alloc);
DCHECK_EQ(0u, reinterpret_cast<size_t>(alloc) % kShadowRatio);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698