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

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

Issue 2490533003: [wasm] Always trap for memory accesses with offset=uint32_max. (Closed)
Patch Set: 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
« src/compiler/wasm-compiler.cc ('K') | « src/compiler/wasm-compiler.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.cc
diff --git a/test/cctest/wasm/test-run-wasm.cc b/test/cctest/wasm/test-run-wasm.cc
index ee532ae807174b823d49b75440f0794d353e9c3c..f221dadd898b42ed2fe34eb20512b63b5c580a24 100644
--- a/test/cctest/wasm/test-run-wasm.cc
+++ b/test/cctest/wasm/test-run-wasm.cc
@@ -1109,6 +1109,20 @@ WASM_EXEC_TEST(I32ReinterpretF32) {
}
}
+WASM_EXEC_TEST(LoadMaxUint32Offset) {
+ TestingModule module(execution_mode);
+ int32_t* memory = module.AddMemoryElems<int32_t>(8);
+ WasmRunner<int32_t> r(&module);
+
+ BUILD(r, kExprI8Const, 0, // index
+ static_cast<byte>(v8::internal::wasm::WasmOpcodes::LoadStoreOpcodeOf(
+ MachineType::Int32(), false)), // --
+ 0, // alignement
titzer 2016/11/08 15:16:32 alignment
+ U32V_5(0xffffffff)); // offset
+
+ CHECK_TRAP32(r.Call());
+}
+
WASM_EXEC_TEST(LoadStoreLoad) {
TestingModule module(execution_mode);
int32_t* memory = module.AddMemoryElems<int32_t>(8);
« src/compiler/wasm-compiler.cc ('K') | « src/compiler/wasm-compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698