Chromium Code Reviews| 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. |