[wasm] Fix unterminated block in WKI return_call for inlined functions [v8/v8 : main]

0 views
Skip to first unread message

Jakob Kummerow (Gerrit)

unread,
6:23 AM (15 hours ago) 6:23 AM
to Ayako Iwasaki, Jakob Kummerow, android-bu...@system.gserviceaccount.com, v8-re...@googlegroups.com, was...@google.com
Attention needed from Ayako Iwasaki

Jakob Kummerow added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Jakob Kummerow . resolved

This is not a fix: it effectively doesn't change any behavior (the old code would take the `return` on line 2732), and doesn't avoid the failure (run the repro to see for yourself).

Open in Gerrit

Related details

Attention is currently required from:
  • Ayako Iwasaki
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I6eaa2329e4a945e2c97d067164f4647da8b77438
Gerrit-Change-Number: 8028980
Gerrit-PatchSet: 1
Gerrit-Owner: Ayako Iwasaki <a.iwas...@gmail.com>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Attention: Ayako Iwasaki <a.iwas...@gmail.com>
Gerrit-Comment-Date: Wed, 01 Jul 2026 10:23:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Ayako Iwasaki (Gerrit)

unread,
8:53 AM (12 hours ago) 8:53 AM
to Jakob Kummerow, android-bu...@system.gserviceaccount.com, v8-re...@googlegroups.com, was...@google.com
Attention needed from Jakob Kummerow

Ayako Iwasaki added 1 comment

Patchset-level comments
File-level comment, Patchset 1:
Jakob Kummerow . unresolved

This is not a fix: it effectively doesn't change any behavior (the old code would take the `return` on line 2732), and doesn't avoid the failure (run the repro to see for yourself).

Ayako Iwasaki

Sorry about PS1. That was indeed my misunderstanding and a no-op as Jakob san pointed out.

I uploaded PS2 as the actual fix, adding a decoder->current_catch() == -1 check
to skip the WKI fast path when inside a try block.

HandleWellKnownImport uses kCatchInThisFrame internally, which routes exceptions to the enclosing try's catch block. But return_call doesn't call MarkMightThrow(), so at kExprEnd the decoder skips the implicit CatchAll/Rethrow for catch-less try blocks, leaving that catch block unterminated in the graph.

Outside try blocks (current_catch() == -1), kCatchInThisFrame does not create exception-routing blocks, so the WKI fast path is safe there.

Tested with a debug build (is_debug=true, v8_enable_slow_dchecks=true). repro-529842414.js triggers a DCHECK failure before the fix and exits cleanly after. return-call-wki.js (no try blocks) still passes.

Open in Gerrit

Related details

Attention is currently required from:
  • Jakob Kummerow
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I6eaa2329e4a945e2c97d067164f4647da8b77438
    Gerrit-Change-Number: 8028980
    Gerrit-PatchSet: 2
    Gerrit-Owner: Ayako Iwasaki <a.iwas...@gmail.com>
    Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Comment-Date: Wed, 01 Jul 2026 12:53:09 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Jakob Kummerow <jkum...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Ayako Iwasaki (Gerrit)

    unread,
    10:25 AM (11 hours ago) 10:25 AM
    to Jakob Kummerow, android-bu...@system.gserviceaccount.com, v8-re...@googlegroups.com, was...@google.com
    Attention needed from Jakob Kummerow

    Ayako Iwasaki added 1 comment

    Patchset-level comments
    File-level comment, Patchset 3 (Latest):
    Ayako Iwasaki . resolved

    Daniel san created a fix (https://chromium-review.googlesource.com/c/v8/v8/+/8025515) and we can safely close this PL. Sorry to bother you.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Jakob Kummerow
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I6eaa2329e4a945e2c97d067164f4647da8b77438
    Gerrit-Change-Number: 8028980
    Gerrit-PatchSet: 3
    Gerrit-Owner: Ayako Iwasaki <a.iwas...@gmail.com>
    Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Comment-Date: Wed, 01 Jul 2026 14:25:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Ayako Iwasaki (Gerrit)

    unread,
    10:26 AM (11 hours ago) 10:26 AM
    to Jakob Kummerow, android-bu...@system.gserviceaccount.com, v8-re...@googlegroups.com, was...@google.com

    Ayako Iwasaki abandoned this change.

    View Change

    Ayako Iwasaki abandoned this change

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: abandon
    unsatisfied_requirement
    open
    diffy

    Jakob Kummerow (Gerrit)

    unread,
    11:15 AM (10 hours ago) 11:15 AM
    to Ayako Iwasaki, Jakob Kummerow, android-bu...@system.gserviceaccount.com, v8-re...@googlegroups.com, was...@google.com

    Jakob Kummerow added 1 comment

    Patchset-level comments
    Jakob Kummerow . resolved

    Thanks for following up here, and don't worry about having introduced a regression: it happens to all of us, that's why we have tests and fuzzers and so on.

    I agree that crrev.com/c/8025515 has a few bits we'd still have to add here (in particular: great test coverage), so let's go with that. Sorry for the collision with your work; we appreciate your prompt effort to fix this, and are looking forward to future contributions 😊

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I6eaa2329e4a945e2c97d067164f4647da8b77438
    Gerrit-Change-Number: 8028980
    Gerrit-PatchSet: 3
    Gerrit-Owner: Ayako Iwasaki <a.iwas...@gmail.com>
    Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Comment-Date: Wed, 01 Jul 2026 15:15:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages