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

Unified Diff: test/unittests/wasm/module-decoder-unittest.cc

Issue 2484643002: [wasm] Compare the maximum memory size with the spec limit, not with the V8 limit (Closed)
Patch Set: Add a negative test 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 | « src/wasm/wasm-module.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/wasm/module-decoder-unittest.cc
diff --git a/test/unittests/wasm/module-decoder-unittest.cc b/test/unittests/wasm/module-decoder-unittest.cc
index 542c3c9d428bec2d4125501b51a5f3f6d69e262f..8c0f234f4432263e2d23b3adffbf5fa5b2ca13cc 100644
--- a/test/unittests/wasm/module-decoder-unittest.cc
+++ b/test/unittests/wasm/module-decoder-unittest.cc
@@ -475,6 +475,23 @@ TEST_F(WasmModuleVerifyTest, TwoDataSegments) {
EXPECT_OFF_END_FAILURE(data, 14, sizeof(data));
}
+TEST_F(WasmModuleVerifyTest, MaxMaximumMemorySize) {
+ {
+ const byte data[] = {
+ SECTION(Memory, 6), ENTRY_COUNT(1), kResizableMaximumFlag, 0,
+ U32V_3(65536),
+ };
+ EXPECT_VERIFIES(data);
+ }
+ {
+ const byte data[] = {
+ SECTION(Memory, 6), ENTRY_COUNT(1), kResizableMaximumFlag, 0,
+ U32V_3(65537),
+ };
+ EXPECT_FAILURE(data);
+ }
+}
+
TEST_F(WasmModuleVerifyTest, DataSegment_wrong_init_type) {
const byte data[] = {
SECTION(Memory, 4),
« no previous file with comments | « src/wasm/wasm-module.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698