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

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

Issue 2527533003: Make SyzyAsan support the allocation > 1GB (Closed)
Patch Set: Move the limit to block.h/cc 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') | no next file with comments »
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..ab20132beb3a70aa926627de91879ceb87d1e1c7 100644
--- a/syzygy/agent/asan/block.h
+++ b/syzygy/agent/asan/block.h
@@ -112,7 +112,12 @@ 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 const size_t kBlockHeaderChecksumBits = 13;
+
+// The maximum allocation size that we can handle in SyzyAsan, this is
+// constrained by the number of bits used to store the block size in the block
+// header structure.
+static const uint32_t kBlockMaxAllocSize = static_cast<uint32_t>(1 << 31) - 1;
chrisha 2016/11/24 17:23:23 Use a constexpr or a #define to store the value 31
Sébastien Marchand 2016/11/25 02:38:21 Done.
// The state of an Asan block. These are in the order that reflects the typical
// lifespan of an allocation.
@@ -157,7 +162,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 : 31;
};
// 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698