deps: V8: cherry-pick 8e214ec3ec8c · nodejs/node@eae2c27 · GitHub
Skip to content

Commit eae2c27

Browse files
thibaudmichaudmarco-ippolito
authored andcommitted
deps: V8: cherry-pick 8e214ec3ec8c
Original commit message: [wasm][exnref] Fix catchless try_table If the try_table does not have a catch handler, we don't update the {current_catch_} index or set the {previous_catch} field of the block when we enter it. Therefore also skip the reverse operation when the block ends. R=clemensb@chromium.org Fixed: 372261626 Change-Id: Ib3a23e32f9d0ec153d6a00733d96b52cf040e8bd Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5920086 Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#96481} Refs: v8/v8@8e214ec PR-URL: #62783 Reviewed-By: Xuguang Mei <meixuguang@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent a1799a4 commit eae2c27

3 files changed

Lines changed: 27 additions & 2 deletions

File tree

common.gypi

Lines changed: 1 addition & 1 deletion

deps/v8/src/wasm/function-body-decoder-impl.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3483,7 +3483,11 @@ class WasmFullDecoder : public WasmDecoder<ValidationTag, decoding_mode> {
34833483
if (!VALIDATE(TypeCheckOneArmedIf(c))) return 0;
34843484
}
34853485
if (c->is_try_table()) {
3486-
current_catch_ = c->previous_catch;
3486+
// "Pop" the {current_catch_} index. We did not push it if the block has
3487+
// no handler, so also skip it here in this case.
3488+
if (c->catch_cases.size() > 0) {
3489+
current_catch_ = c->previous_catch;
3490+
}
34873491
FallThrough();
34883492
// Temporarily set the reachability for the catch handlers, and restore
34893493
// it before we actually exit the try block.
Lines changed: 21 additions & 0 deletions

0 commit comments

Comments
 (0)