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

Unified Diff: syzygy/agent/asan/block_unittest.cc

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
Index: syzygy/agent/asan/block_unittest.cc
diff --git a/syzygy/agent/asan/block_unittest.cc b/syzygy/agent/asan/block_unittest.cc
index fa34abcbac3aea100250e1cb6908c4fb2143dc42..08a4dd6a2ddc39bc0754df223a91bdbe14905477 100644
--- a/syzygy/agent/asan/block_unittest.cc
+++ b/syzygy/agent/asan/block_unittest.cc
@@ -192,7 +192,12 @@ TEST_F(BlockTest, BlockPlanLayout) {
EXPECT_EQ(BuildBlockLayout(4096, 3 * 4096, 24, 8064, 100, 4072, 28), layout);
#endif
- // Plan a layout with an invalid size, this should fail.
+ EXPECT_TRUE(BlockPlanLayout(
+ 8, 8, static_cast<uint32_t>(1 << kBlockBodySizeBits) - 1, 0, 0, &layout));
+
+ // Plan some layouts with an invalid size, this should fail.
+ EXPECT_FALSE(BlockPlanLayout(
+ 8, 8, static_cast<uint32_t>(1 << kBlockBodySizeBits), 0, 0, &layout));
EXPECT_FALSE(BlockPlanLayout(8, 8, 0xffffffff, 0, 0, &layout));
}

Powered by Google App Engine
This is Rietveld 408576698