diff options
author | Keith Winstein <keithw@cs.stanford.edu> | 2022-02-17 07:08:15 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-17 15:08:15 +0000 |
commit | 407c5f65d172bba3d8b62579468d9c241556ef4b (patch) | |
tree | e01812f68053a2ead6c87e12569b687638cccea7 /test/binary | |
parent | 34003ef5937192f92fa7e6a772de59ef866f6de2 (diff) | |
download | wabt-407c5f65d172bba3d8b62579468d9c241556ef4b.tar.gz wabt-407c5f65d172bba3d8b62579468d9c241556ef4b.tar.bz2 wabt-407c5f65d172bba3d8b62579468d9c241556ef4b.zip |
wasm2c: bounds-check active data loads (#1829)
The bulk-memory proposal changed OOB access (when loading an active
data segment) from a validation failure to an initialization-time trap,
but wasm2c wasn't checking OOB access in LOAD_DATA().
When WASM_RT_MEMCHECK_SIGNAL_HANDLER is unset, this could produce memory
corruption. When WASM_RT_MEMCHECK_SIGNAL_HANDLER is set, this led to
failure in the new "data" tests that verify that modules with zero-length
active data segments are uninstantiable if offset > mem.size.
Add an unconditional bounds-check and restore the `test/wasm2c/spec/data.txt`
test (one of the failing tests tracked at #1737).
Diffstat (limited to 'test/binary')
0 files changed, 0 insertions, 0 deletions