From cdc1bb3406f40bdab918749d020e0ef03942434d Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 8 Jun 2021 18:56:10 -0700 Subject: [Wasm GC] Properly validate BrOn* (#3928) The noteBreak call was in the wrong place, causing us to not note breaks from BrOnNull for example, which could make validation miss errors. Noticed in #3926 --- src/wasm/wasm-validator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wasm/wasm-validator.cpp') diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index bbc92f09c..6035a38a9 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -2252,10 +2252,10 @@ void FunctionValidator::visitBrOn(BrOn* curr) { // casts to. shouldBeTrue( curr->rtt->type.isRtt(), curr, "br_on_cast rtt must have rtt type"); - noteBreak(curr->name, curr->getSentType(), curr); } else { shouldBeTrue(curr->rtt == nullptr, curr, "non-cast BrOn must not have rtt"); } + noteBreak(curr->name, curr->getSentType(), curr); } void FunctionValidator::visitRttCanon(RttCanon* curr) { -- cgit v1.2.3