v8/test/cctest/wasm
Clemens Hammacher d38334c575 [wasm] [interpreter] Fix integer underflow in mem access
For OOB checks on memory accesses, we first subtracted the size of the
type to load/store from the memory size, and then compared against this
effective_size. If the memory size is smaller than the size of the type,
this would lead to an integer underflow, and we would try to load the
value.
This CL fixes this, and adds a test case for this.

R=ahaas@chromium.org
BUG=v8:5822

Change-Id: I26fcba0be7343c88b8459d029b0c0af095d2466a
Reviewed-on: https://chromium-review.googlesource.com/465946
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44345}
2017-04-03 15:00:00 +00:00
..
OWNERS Make clemensh owner (wasm, asmjs and general) 2017-01-13 10:20:44 +00:00
test-run-wasm-64.cc [wasm] Alignment information of wasm programs cannot be trusted 2017-03-28 08:28:25 +00:00
test-run-wasm-asmjs.cc [iwyu] Pre-work for removing unallowed include macro-assembler.h -> assembler-inl.h 2017-02-23 12:10:21 +00:00
test-run-wasm-interpreter.cc [wasm] [interpreter] Fix integer underflow in mem access 2017-04-03 15:00:00 +00:00
test-run-wasm-js.cc [iwyu] Pre-work for removing unallowed include macro-assembler.h -> assembler-inl.h 2017-02-23 12:10:21 +00:00
test-run-wasm-module.cc [wasm] [cleanup] Attach methods to the object they operate on 2017-03-31 08:12:15 +00:00
test-run-wasm-relocation.cc Disentangle assembler from isolate. 2017-03-17 11:18:06 +00:00
test-run-wasm-simd.cc MIPS[64]: Support for some SIMD operations 2017-04-03 08:22:19 +00:00
test-run-wasm.cc [wasm] Alignment information of wasm programs cannot be trusted 2017-03-28 08:28:25 +00:00
test-wasm-breakpoints.cc [debugger,api] deprecate everything in v8-debug.h 2017-03-10 07:06:25 +00:00
test-wasm-interpreter-entry.cc [wasm] For wasm-interpret-all: Iterate code only once for patching 2017-03-20 16:44:02 +00:00
test-wasm-stack.cc [iwyu] Pre-work for removing unallowed include macro-assembler.h -> assembler-inl.h 2017-02-23 12:10:21 +00:00
test-wasm-trap-position.cc [wasm] Enable cctests when out of bounds trap handler is enabled 2017-03-15 01:40:09 +00:00
wasm-run-utils.h Hide WasmModule.origin field behind readable accessors. 2017-03-25 01:54:09 +00:00