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

Unified Diff: test/cctest/wasm/test-run-wasm-module.cc

Issue 2649553002: [wasm] Check segment bounds beforehand (Closed)
Patch Set: Rebase Created 3 years, 11 months 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm-module.cc
diff --git a/test/cctest/wasm/test-run-wasm-module.cc b/test/cctest/wasm/test-run-wasm-module.cc
index 8a4b9aa15b0abdd52f68dcac87f443ee3366c2d8..8b89b4a0633667cbffea49d1f672cb793dcffdca 100644
--- a/test/cctest/wasm/test-run-wasm-module.cc
+++ b/test/cctest/wasm/test-run-wasm-module.cc
@@ -915,7 +915,7 @@ TEST(EmptyMemoryEmptyDataSegment) {
U32V_1(6), // section size
ENTRY_COUNT(1), // --
0, // linear memory index
- WASM_I32V_1(24), // destination offset
+ WASM_I32V_1(0), // destination offset
kExprEnd,
U32V_1(0), // source size
};
@@ -957,8 +957,8 @@ TEST(MemoryWithOOBEmptyDataSegment) {
testing::CompileInstantiateWasmModuleForTesting(isolate, &thrower, data,
data + arraysize(data),
ModuleOrigin::kWasmOrigin);
- // It should be possible to instantiate this module.
- CHECK(!thrower.error());
+ // It should not be possible to instantiate this module.
+ CHECK(thrower.error());
}
Cleanup();
}
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698