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

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

Issue 2490533003: [wasm] Always trap for memory accesses with offset=uint32_max. (Closed)
Patch Set: Remove unused variable, address comments 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/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..a16d28e389b8c027b68d2925a530f890fa20a16e 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);
+ 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, // 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);
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698