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

Unified Diff: src/wasm/ast-decoder.cc

Issue 2319213003: [wasm] Do not produce code for br_if if its condition does not validate. (Closed)
Patch Set: Created 4 years, 3 months 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 | test/mjsunit/wasm/regression-644682.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/ast-decoder.cc
diff --git a/src/wasm/ast-decoder.cc b/src/wasm/ast-decoder.cc
index 48db8e9e68089e74f6fe6a8b42cadd353178a3dd..7dffef2649ff986d5a01921e3ff70861d07ec780 100644
--- a/src/wasm/ast-decoder.cc
+++ b/src/wasm/ast-decoder.cc
@@ -1023,7 +1023,7 @@ class WasmFullDecoder : public WasmDecoder {
Value cond = Pop(operand.arity, kAstI32);
Value val = {pc_, nullptr, kAstStmt};
if (operand.arity == 1) val = Pop();
- if (Validate(pc_, operand, control_)) {
+ if (ok() && Validate(pc_, operand, control_)) {
SsaEnv* fenv = ssa_env_;
SsaEnv* tenv = Split(fenv);
fenv->SetNotMerged();
« no previous file with comments | « no previous file | test/mjsunit/wasm/regression-644682.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698