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

Unified Diff: syzygy/agent/asan/block.h

Issue 2527533003: Make SyzyAsan support the allocation > 1GB (Closed)
Patch Set: Do an unguarded alloc if the size > 2GB 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 | syzygy/agent/asan/block.cc » ('j') | syzygy/agent/asan/heap_managers/block_heap_manager.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: syzygy/agent/asan/block.h
diff --git a/syzygy/agent/asan/block.h b/syzygy/agent/asan/block.h
index a2f8e587c0d433e9a4485d5043cb9dd309af38e6..b400a30ccba8196e204d75d9d0bdcdcd5a072533 100644
--- a/syzygy/agent/asan/block.h
+++ b/syzygy/agent/asan/block.h
@@ -112,7 +112,10 @@ static const uint8_t kBlockFloodFillByte = 0xFD;
// The number of bits in the checksum field. This is parameterized so that
// it can be referred to by the checksumming code.
-static const size_t kBlockHeaderChecksumBits = 14;
+static constexpr size_t kBlockHeaderChecksumBits = 13;
+
+// The number of bits used to store the size of an allocation.
+static constexpr size_t kBlockBodySizeBits = 31;
// The state of an Asan block. These are in the order that reflects the typical
// lifespan of an allocation.
@@ -157,7 +160,7 @@ struct BlockHeader {
// (kShadowRatio / 2) - (body_size % (kShadowRatio / 2)).
unsigned has_excess_trailer_padding : 1;
// The size of the body of the allocation, in bytes.
- unsigned body_size : 30;
+ unsigned body_size : kBlockBodySizeBits;
};
// TODO(loskutov): replace pointers with something more compact.
// The allocation stack of this block.
« no previous file with comments | « no previous file | syzygy/agent/asan/block.cc » ('j') | syzygy/agent/asan/heap_managers/block_heap_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698