Commit ab6aa517 authored by Thibaud Michaud's avatar Thibaud Michaud Committed by Commit Bot

[wasm][mv] Fix multi-return validation order

R=ahaas@chromium.org

Bug: v8:10328
Change-Id: I19ecad9161ea61b4c8a22f80f8ac10ebf23dee53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2148783
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67127}
parent 4615655c
...@@ -2063,7 +2063,7 @@ class WasmFullDecoder : public WasmDecoder<validate> { ...@@ -2063,7 +2063,7 @@ class WasmFullDecoder : public WasmDecoder<validate> {
// Since we deal with unreachable code, we do not have to keep the // Since we deal with unreachable code, we do not have to keep the
// values. // values.
int num_returns = static_cast<int>(this->sig_->return_count()); int num_returns = static_cast<int>(this->sig_->return_count());
for (int i = 0; i < num_returns; ++i) { for (int i = num_returns - 1; i >= 0; --i) {
Pop(i, this->sig_->GetReturn(i)); Pop(i, this->sig_->GetReturn(i));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment