v8/test/cctest/wasm
Andreas Haas c476508b1a [wasm][anyref] Implement correct type checking for br_table
This CL refactors the type-checking for br_table instructions.
Originally, we iterated over all targets of br_table and checked
if the values on the stack match the types expected by the
target's signature. However, this caused problems with type
checking unreachable br_table instructions where some stack
values are unavailable. According to the anyref proposal, the
expected type of br_table is the greatest lower bound of
all its targets. With the existing implementation, the expected
types were the types of the first target.

With this CL, we first calculate the expected types of br_table,
and only then inspect the stack if matching values are available.

R=titzer@chromium.org

Bug: v8:7581
Change-Id: I12208323bda88c363e28ffb0e002d59ef9a6b9d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1649791
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62354}
2019-06-25 12:00:21 +00:00
..
OWNERS Reduce wasm OWNERS to current team members 2018-10-15 14:47:49 +00:00
test-c-wasm-entry.cc Move more relevant files to src/objects 2019-05-23 08:52:30 +00:00
test-jump-table-assembler.cc Move utility code to src/utils 2019-05-23 14:13:34 +00:00
test-run-wasm-64.cc Move more relevant files to src/objects 2019-05-23 08:52:30 +00:00
test-run-wasm-asmjs.cc [Liftoff] List unsupported opcodes explicitly 2019-05-29 09:47:28 +00:00
test-run-wasm-atomics64.cc [wasm] Fix Int64-lowering to handle non-const index for I64Atomic ops 2019-04-11 21:10:40 +00:00
test-run-wasm-atomics.cc [test] Modernize value helpers 2019-02-01 12:56:59 +00:00
test-run-wasm-bulk-memory.cc [wasm][anyref] Cache export wrappers per signature 2019-05-22 14:59:50 +00:00
test-run-wasm-exceptions.cc [wasm][anyref] Cache export wrappers per signature 2019-05-22 14:59:50 +00:00
test-run-wasm-interpreter.cc [wasm][anyref] Cache export wrappers per signature 2019-05-22 14:59:50 +00:00
test-run-wasm-js.cc [wasm][anyref] Cache export wrappers per signature 2019-05-22 14:59:50 +00:00
test-run-wasm-module.cc [base] Move v8memory.h to base/memory.h 2019-06-21 11:44:18 +00:00
test-run-wasm-sign-extension.cc [wasm] Unify all enums representing execution tiers 2018-08-21 15:45:18 +00:00
test-run-wasm-simd.cc Fix macro to generate SIMD instructions for test 2019-06-19 20:44:52 +00:00
test-run-wasm.cc [wasm][anyref] Implement correct type checking for br_table 2019-06-25 12:00:21 +00:00
test-streaming-compilation.cc Move remaining files in src/ 2019-05-24 18:24:36 +00:00
test-wasm-breakpoints.cc Move utility code to src/utils 2019-05-23 14:13:34 +00:00
test-wasm-codegen.cc [wasm][cleanup] Using 'using' instead of 'typedef' 2019-03-29 10:20:30 +00:00
test-wasm-import-wrapper-cache.cc [wasm] Compile import wrappers in parallel 2019-05-27 09:36:55 +00:00
test-wasm-interpreter-entry.cc Move more relevant files to src/objects 2019-05-23 08:52:30 +00:00
test-wasm-serialization.cc Move utility code to src/utils 2019-05-23 14:13:34 +00:00
test-wasm-shared-engine.cc Move more relevant files to src/objects 2019-05-23 08:52:30 +00:00
test-wasm-stack.cc [stack-trace] Change column number for wasm frames to module offset 2019-06-14 11:33:18 +00:00
test-wasm-trap-position.cc [stack-trace] Change column number for wasm frames to module offset 2019-06-14 11:33:18 +00:00
wasm-atomics-utils.h [wasm][cleanup] Using 'using' instead of 'typedef' 2019-03-29 10:20:30 +00:00
wasm-run-utils.cc [wasm] Compile import wrappers in parallel 2019-05-27 09:36:55 +00:00
wasm-run-utils.h [base] Move v8memory.h to base/memory.h 2019-06-21 11:44:18 +00:00