[v24.x] deps: V8: cherry-pick 657d8de27427#62784
Open
guybedford wants to merge 2 commits intonodejs:v24.x-stagingfrom
Open
[v24.x] deps: V8: cherry-pick 657d8de27427#62784guybedford wants to merge 2 commits intonodejs:v24.x-stagingfrom
guybedford wants to merge 2 commits intonodejs:v24.x-stagingfrom
Conversation
Original commit message:
[maglev] Fix throwing node inside eager inlining
This commit refactors the exception handling logic to correctly identify
and associate nodes with their respective `catch` blocks, even
when multiple levels of inlining are involved.
Previously, the check `!IsInsideTryBlock() && !is_eager_inline()` was
insufficient to determine if catch block inside `CatchDetails` was
already created.
Specifically, consider the case where:
1. Function `bar` is non-eagerly inlined into `foo`.
2. `foo` contains a `catch` block.
3. `bar` calls `in_bar`, which is eagerly inlined.
4. A node within `in_bar` can `throw`.
In this scenario, `is_eager_inline` would be true when compiling
`in_bar`, leading to an incorrect assumption that the catch block didn't exist yet.
This change addresses the issue by propagating a boolean value via
`CatchDetails`. This boolean accurately indicates whether a `catch`
block is present in the call chain, allowing for correct exception
handling regardless of inlining depth or eagerness.
Fixed: 417768368
Change-Id: Ic52f72f302b4dc644bdcad939addf98111bc525b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6563500
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#100380}
Refs: v8/v8@657d8de
Collaborator
|
Review requested:
|
meixg
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This backports the V8 commit to fix a correctness bug in WebAssembly Exception Handling under Maglev where throwing nodes inside eager-inlined functions could escape their enclosing try/catch handler.
Original commit message:
Refs: v8/v8@657d8de