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

Unified Diff: src/compiler/wasm-compiler.cc

Issue 2484623002: [wasm] Indirect calls without function table cause validation errors. (Closed)
Patch Set: try to export symbols 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 | « no previous file | src/wasm/ast-decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index baa6b7b41b0d9bc0b9dd3baa1a004c7cc169f00c..c81d2c8df2cd60f038d1c6853f6946491f7dab56 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -2168,15 +2168,7 @@ Node* WasmGraphBuilder::CallIndirect(uint32_t sig_index, Node** args,
uint32_t table_index = 0;
wasm::FunctionSig* sig = module_->GetSignature(sig_index);
- if (!module_->IsValidTable(table_index)) {
- // No function table. Generate a trap and return a constant.
- trap_->AddTrapIfFalse(wasm::kTrapFuncInvalid, Int32Constant(0), position);
- (*rets) = Buffer(sig->return_count());
- for (size_t i = 0; i < sig->return_count(); i++) {
- (*rets)[i] = trap_->GetTrapValue(sig->GetReturn(i));
- }
- return trap_->GetTrapValue(sig);
- }
+ DCHECK(module_->IsValidTable(table_index));
EnsureFunctionTableNodes();
MachineOperatorBuilder* machine = jsgraph()->machine();
« no previous file with comments | « no previous file | src/wasm/ast-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698