Issue 14398 in v8: Implement the new wasm Exception Handling proposal

36 views
Skip to first unread message

thiba… via monorail

unread,
Oct 19, 2023, 9:06:59 AM10/19/23
to v8-re...@googlegroups.com
Status: Started
Owner: thib...@chromium.org
Components: WebAssembly
Priority: 1
Type: Task

New issue 14398 by thib...@chromium.org: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398

Tracking bug for the new exception handling proposal.
The new proposal will be implemented behind a flag, on top of the old proposal.
The main difference with the legacy exception handling proposal is the absence of a lexical rethrow. Instead, the catch handlers in a try-table block can push the caught exception on the stack as an exnref, and this exnref can be rethrown using the throw-ref instruction.

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Git Watcher via monorail

unread,
Oct 25, 2023, 9:08:17 AM10/25/23
to v8-re...@googlegroups.com

Comment #1 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c1

The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/8f1880f0da10240775b5f779860233e762bac8e4

commit 8f1880f0da10240775b5f779860233e762bac8e4
Author: Thibaud Michaud <thib...@chromium.org>
Date: Wed Oct 25 10:44:56 2023

[wasm][exnref] Reintroduce exnref type

R=mano...@chromium.org

Bug: v8:14398
Change-Id: I3b25537a742f4f22ed9d5450997f109ab3f0b433
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4953360
Reviewed-by: Manos Koukoutos <mano...@chromium.org>
Reviewed-by: Philip Pfaffe <pfa...@chromium.org>
Commit-Queue: Thibaud Michaud <thib...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#90587}

[modify] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/src/wasm/wasm-objects.cc
[modify] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/src/wasm/constant-expression.cc
[modify] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/test/unittests/wasm/function-body-decoder-unittest.cc
[modify] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/src/wasm/wasm-subtyping.cc
[modify] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/test/mjsunit/wasm/wasm-module-builder.js
[modify] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/src/wasm/wasm-feature-flags.h
[modify] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/src/wasm/wasm-js.cc
[modify] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/src/wasm/function-body-decoder-impl.h
[modify] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/src/wasm/wasm-constants.h
[modify] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/src/compiler/wasm-compiler.cc
[modify] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/src/debug/debug-wasm-objects.cc
[add] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/test/mjsunit/wasm/type-reflection-exnref.js
[modify] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/test/unittests/wasm/subtyping-unittest.cc
[modify] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/src/wasm/value-type.h
[add] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/test/mjsunit/wasm/exnref-global.js
[modify] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/src/wasm/constant-expression-interface.cc
[add] https://crrev.com/8f1880f0da10240775b5f779860233e762bac8e4/test/mjsunit/wasm/exnref.js

Git Watcher via monorail

unread,
Oct 31, 2023, 5:40:09 AM10/31/23
to v8-re...@googlegroups.com

Git Watcher via monorail

unread,
Oct 31, 2023, 10:42:09 AM10/31/23
to v8-re...@googlegroups.com

Comment #3 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c3


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/74c0c6e88aedf410d49efc086ebca91cd212e330

commit 74c0c6e88aedf410d49efc086ebca91cd212e330
Author: Thibaud Michaud <thib...@chromium.org>
Date: Fri Oct 27 14:41:00 2023

[wasm][exnref] Fix exnref subtyping

R=mano...@chromium.org

Bug: chromium:1496602,v8:14398
Change-Id: Ie9f20fd22fe0320357bfd72c0d6d483bc7b37fea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4983821
Commit-Queue: Thibaud Michaud <thib...@chromium.org>
Reviewed-by: Manos Koukoutos <mano...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#90690}

[modify] https://crrev.com/74c0c6e88aedf410d49efc086ebca91cd212e330/src/wasm/wasm-subtyping.cc
[modify] https://crrev.com/74c0c6e88aedf410d49efc086ebca91cd212e330/test/unittests/wasm/subtyping-unittest.cc

Git Watcher via monorail

unread,
Nov 2, 2023, 7:13:13 AM11/2/23
to v8-re...@googlegroups.com

Comment #4 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c4


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/3de45211640ea3c7f7637408b74bc9a186a7e97d

commit 3de45211640ea3c7f7637408b74bc9a186a7e97d
Author: Thibaud Michaud <thib...@chromium.org>
Date: Thu Nov 02 09:56:35 2023

[wasm][exnref] Implement try-table in turboshaft

R=mano...@chromium.org

Bug: v8:14398
Change-Id: Ia09370eaab7ef1957faeb4bac29e17c5bf4633f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4976268
Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Thibaud Michaud <thib...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#90704}

[modify] https://crrev.com/3de45211640ea3c7f7637408b74bc9a186a7e97d/src/wasm/graph-builder-interface.cc
[add] https://crrev.com/3de45211640ea3c7f7637408b74bc9a186a7e97d/test/mjsunit/wasm/exnref-rethrow.js
[modify] https://crrev.com/3de45211640ea3c7f7637408b74bc9a186a7e97d/src/compiler/wasm-gc-lowering.cc
[modify] https://crrev.com/3de45211640ea3c7f7637408b74bc9a186a7e97d/test/mjsunit/wasm/wasm-module-builder.js
[modify] https://crrev.com/3de45211640ea3c7f7637408b74bc9a186a7e97d/src/wasm/turboshaft-graph-interface.cc
[modify] https://crrev.com/3de45211640ea3c7f7637408b74bc9a186a7e97d/src/compiler/turboshaft/graph.h
[modify] https://crrev.com/3de45211640ea3c7f7637408b74bc9a186a7e97d/src/wasm/baseline/liftoff-compiler.cc
[modify] https://crrev.com/3de45211640ea3c7f7637408b74bc9a186a7e97d/src/wasm/function-body-decoder-impl.h
[modify] https://crrev.com/3de45211640ea3c7f7637408b74bc9a186a7e97d/test/mjsunit/wasm/exnref.js
[modify] https://crrev.com/3de45211640ea3c7f7637408b74bc9a186a7e97d/src/compiler/turboshaft/wasm-lowering-reducer.h

Git Watcher via monorail

unread,
Nov 6, 2023, 10:27:16 AM11/6/23
to v8-re...@googlegroups.com

Comment #5 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c5


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/8569885d99a6120423197ea8ccd79e7d31f5d926

commit 8569885d99a6120423197ea8ccd79e7d31f5d926
Author: Thibaud Michaud <thib...@chromium.org>
Date: Mon Nov 06 10:51:51 2023

[wasm][exnref] Mark exnref as experimental

R=mano...@chromium.org

Bug: chromium:1499582,v8:14398
Change-Id: Iad09677d6fc389bef5a91410321df787bd1d6db8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5007731
Reviewed-by: Manos Koukoutos <mano...@chromium.org>
Commit-Queue: Thibaud Michaud <thib...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#90761}

[modify] https://crrev.com/8569885d99a6120423197ea8ccd79e7d31f5d926/src/wasm/wasm-feature-flags.h

Git Watcher via monorail

unread,
Nov 10, 2023, 7:50:15 AM11/10/23
to v8-re...@googlegroups.com

Git Watcher via monorail

unread,
Nov 13, 2023, 8:38:15 AM11/13/23
to v8-re...@googlegroups.com

Comment #7 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c7


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/700381d5b84d5a0ea736d75021f7d6924eca54b4

commit 700381d5b84d5a0ea736d75021f7d6924eca54b4
Author: Thibaud Michaud <thib...@chromium.org>
Date: Mon Nov 13 11:14:01 2023

[wasm][exnref] Enable exnref spec tests

R=ah...@chromium.org

Bug: v8:14398
Change-Id: If0bb4091e081bca5e9514ea5a09c32630357ae19
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5012677
Commit-Queue: Thibaud Michaud <thib...@chromium.org>
Reviewed-by: Jakob Kummerow <jkum...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#90884}

[modify] https://crrev.com/700381d5b84d5a0ea736d75021f7d6924eca54b4/test/wasm-spec-tests/tests.tar.gz.sha1
[modify] https://crrev.com/700381d5b84d5a0ea736d75021f7d6924eca54b4/test/unittests/wasm/function-body-decoder-unittest.cc
[modify] https://crrev.com/700381d5b84d5a0ea736d75021f7d6924eca54b4/test/wasm-spec-tests/wasm-spec-tests.status
[modify] https://crrev.com/700381d5b84d5a0ea736d75021f7d6924eca54b4/test/wasm-js/tests.tar.gz.sha1
[modify] https://crrev.com/700381d5b84d5a0ea736d75021f7d6924eca54b4/test/wasm-js/wasm-js.status
[modify] https://crrev.com/700381d5b84d5a0ea736d75021f7d6924eca54b4/tools/wasm/update-wasm-spec-tests.sh
[modify] https://crrev.com/700381d5b84d5a0ea736d75021f7d6924eca54b4/test/wasm-spec-tests/testcfg.py
[modify] https://crrev.com/700381d5b84d5a0ea736d75021f7d6924eca54b4/src/wasm/baseline/liftoff-compiler.cc
[modify] https://crrev.com/700381d5b84d5a0ea736d75021f7d6924eca54b4/test/mjsunit/wasm/exnref.js
[modify] https://crrev.com/700381d5b84d5a0ea736d75021f7d6924eca54b4/src/wasm/function-body-decoder-impl.h

Git Watcher via monorail

unread,
Nov 13, 2023, 9:53:10 AM11/13/23
to v8-re...@googlegroups.com

Comment #8 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c8


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/d5d40dadd4cfe63573ec79956c744d59ffe4900d

commit d5d40dadd4cfe63573ec79956c744d59ffe4900d
Author: Thibaud Michaud <thib...@chromium.org>
Date: Mon Nov 13 11:44:36 2023

[wasm][exnref] Implement try-table in TurboFan

R=clem...@chromium.org

Bug: v8:14398
Change-Id: I74411c64528ecfab14d6450f9fa8fa76843cfcf0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5023768
Commit-Queue: Thibaud Michaud <thib...@chromium.org>
Reviewed-by: Clemens Backes <clem...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#90887}

[modify] https://crrev.com/d5d40dadd4cfe63573ec79956c744d59ffe4900d/src/wasm/graph-builder-interface.cc
[modify] https://crrev.com/d5d40dadd4cfe63573ec79956c744d59ffe4900d/src/wasm/turboshaft-graph-interface.cc
[modify] https://crrev.com/d5d40dadd4cfe63573ec79956c744d59ffe4900d/test/mjsunit/mjsunit.status

Git Watcher via monorail

unread,
Nov 15, 2023, 9:12:09 AM11/15/23
to v8-re...@googlegroups.com

Comment #9 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c9


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/b50d4c5abd11647be8f6e651cfcc62ab3b9e7a94

commit b50d4c5abd11647be8f6e651cfcc62ab3b9e7a94
Author: Thibaud Michaud <thib...@chromium.org>
Date: Wed Nov 15 13:34:33 2023

[wasm][exnref] Do not increment legacy EH use counter on 'throw'

The 'throw' instruction is the same in the legacy (eh) and new
(exnref) proposal. Only count it as a use of the new proposal so that we
can monitor the actual use count of the old proposal.

R=clem...@chromium.org

Bug: v8:14398
Change-Id: Id5b96b7be551d284a0628a326767b486a6d7af8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5030407
Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Thibaud Michaud <thib...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#90962}

[modify] https://crrev.com/b50d4c5abd11647be8f6e651cfcc62ab3b9e7a94/src/wasm/function-body-decoder-impl.h

Git Watcher via monorail

unread,
Nov 15, 2023, 9:36:17 AM11/15/23
to v8-re...@googlegroups.com

Comment #10 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c10


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/96af725f728fbdad75be9467118586bc1e839160

commit 96af725f728fbdad75be9467118586bc1e839160
Author: Thibaud Michaud <thib...@chromium.org>
Date: Wed Nov 15 09:47:40 2023

[wasm][exnref] Test rethrow null

R=mano...@chromium.org

Bug: v8:14398
Change-Id: I116ff36d1b91b6d31539129626ea8a2e70d0b34e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5030404
Reviewed-by: Manos Koukoutos <mano...@chromium.org>
Commit-Queue: Thibaud Michaud <thib...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#90963}

[modify] https://crrev.com/96af725f728fbdad75be9467118586bc1e839160/test/mjsunit/wasm/exnref-rethrow.js

Git Watcher via monorail

unread,
Nov 15, 2023, 9:53:17 AM11/15/23
to v8-re...@googlegroups.com

Comment #11 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c11


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/8e2245b6e6b9c51379d429d73dd0e3445991f9df

commit 8e2245b6e6b9c51379d429d73dd0e3445991f9df
Author: Thibaud Michaud <thib...@chromium.org>
Date: Wed Nov 15 12:21:20 2023

[wasm][exnref] Stage the new exception handling proposal

R=clem...@chromium.org

Bug: v8:14398
Change-Id: I391b704ee2e22b617960f3d976c507ebf6b7a52b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5032979
Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Thibaud Michaud <thib...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#90967}

[modify] https://crrev.com/8e2245b6e6b9c51379d429d73dd0e3445991f9df/src/wasm/wasm-feature-flags.h

Git Watcher via monorail

unread,
Nov 15, 2023, 11:34:34 AM11/15/23
to v8-re...@googlegroups.com

Comment #12 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c12


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/68c0589cb8fe287a61135d7fc8644a1ca839af2b

commit 68c0589cb8fe287a61135d7fc8644a1ca839af2b
Author: Thibaud Michaud <thib...@chromium.org>
Date: Wed Nov 15 14:53:28 2023

[wasm] Fuzz exnref/try-table

Drive-by 1: rename Exception to Tag in the wasm module builder.
Drive-by 2: remove redundant relaxed-simd feature scope

R=mano...@chromium.org

Bug: v8:14398
Change-Id: I33d88dd7fefc67f697243a937f4bb019c218dc83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5024194
Commit-Queue: Thibaud Michaud <thib...@chromium.org>
Reviewed-by: Manos Koukoutos <mano...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#90971}

[modify] https://crrev.com/68c0589cb8fe287a61135d7fc8644a1ca839af2b/test/fuzzer/wasm-compile.cc
[modify] https://crrev.com/68c0589cb8fe287a61135d7fc8644a1ca839af2b/src/wasm/wasm-module-builder.h
[modify] https://crrev.com/68c0589cb8fe287a61135d7fc8644a1ca839af2b/src/wasm/wasm-module-builder.cc
[modify] https://crrev.com/68c0589cb8fe287a61135d7fc8644a1ca839af2b/src/wasm/wasm-disassembler.cc

Git Watcher via monorail

unread,
Nov 17, 2023, 9:46:11 AM11/17/23
to v8-re...@googlegroups.com

Comment #13 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c13


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/ff2d0bb14d0796c7ad9e071b7043bcf9923628ee

commit ff2d0bb14d0796c7ad9e071b7043bcf9923628ee
Author: Thibaud Michaud <thib...@chromium.org>
Date: Fri Nov 17 13:55:24 2023

[wasm][exnref] Fix catch after catch-all

Stop generating catches after the first catch-all. This is syntactically
allowed, but semantically a no-op.
This fixes a bug in the Turboshaft interface. The next handler expects a
new label in the try block, which the catch-all block does not create.

R=mano...@chromium.org

Bug: v8:14398,chromium:1502837
Change-Id: I8c9bb66c53a4c6e3a9e8a572ae2729222f09929a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5040813
Reviewed-by: Manos Koukoutos <mano...@chromium.org>
Commit-Queue: Thibaud Michaud <thib...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#91031}

[modify] https://crrev.com/ff2d0bb14d0796c7ad9e071b7043bcf9923628ee/test/fuzzer/wasm-fuzzer-common.cc
[add] https://crrev.com/ff2d0bb14d0796c7ad9e071b7043bcf9923628ee/test/mjsunit/regress/wasm/regress-1502837.js
[modify] https://crrev.com/ff2d0bb14d0796c7ad9e071b7043bcf9923628ee/src/wasm/function-body-decoder-impl.h

Git Watcher via monorail

unread,
Nov 22, 2023, 5:09:18 AM11/22/23
to v8-re...@googlegroups.com

Comment #14 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c14


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/fa83ae149a3944f5c1711c7f5538260c3cf447e4

commit fa83ae149a3944f5c1711c7f5538260c3cf447e4
Author: Thibaud Michaud <thib...@chromium.org>
Date: Thu Nov 16 14:56:22 2023

[wasm][exnref] Fix wasm-compile fuzzer

Push the missing catch block types and try block types in {blocks_}.

R=mano...@chromium.org

Bug: v8:14398,chromium:1502816
Change-Id: I2dfa2ee419719e76fe0ff66b11e6cb1ad1ddbfd3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5033411

Reviewed-by: Manos Koukoutos <mano...@chromium.org>
Commit-Queue: Thibaud Michaud <thib...@chromium.org>

Git Watcher via monorail

unread,
Nov 29, 2023, 10:02:15 AM11/29/23
to v8-re...@googlegroups.com

Comment #15 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c15


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/5196fcec450044c48a05716fcf1004b288f3f35b

commit 5196fcec450044c48a05716fcf1004b288f3f35b
Author: Manos Koukoutos <mano...@chromium.org>
Date: Tue Nov 28 11:52:37 2023

[wasm][fuzzer] Fixes related to try_table

- Fix code printing by incrementing control depth.
- Print number of entries for try_table.
- Pop the related block when we leave a try_table scope.
- Handle kExn, kNoExn in `GenerateRef`.
- Implement `top_type` for kExn, kNoExn.
- (Drive-by) Add line breaks to generated testcase.

Bug: v8:14398, chromium:1505174

Change-Id: I38d70bf3360f2a1cdd86b8d2cee930142c4b727c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5057612
Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Commit-Queue: Manos Koukoutos <mano...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#91250}

[modify] https://crrev.com/5196fcec450044c48a05716fcf1004b288f3f35b/test/fuzzer/wasm-compile.cc
[modify] https://crrev.com/5196fcec450044c48a05716fcf1004b288f3f35b/test/fuzzer/wasm-fuzzer-common.cc
[modify] https://crrev.com/5196fcec450044c48a05716fcf1004b288f3f35b/src/wasm/function-body-decoder.cc

Git Watcher via monorail

unread,
Nov 29, 2023, 8:55:17 PM11/29/23
to v8-re...@googlegroups.com

Comment #16 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c16


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/d28e2463380000943b4c16a6c7f879fd0a4427be

commit d28e2463380000943b4c16a6c7f879fd0a4427be
Author: Manos Koukoutos <mano...@chromium.org>
Date: Tue Nov 28 11:58:15 2023

[wasm][exnref] Fix null handling

In some cases in the optimizing compilers, exnref null was still
handled as wasm null. With this change it is now correctly handled as
JS null.


Bug: v8:14398, chromium:1505174

Change-Id: Id8c1504420896b51f27afaa4b5567405ee731ab4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5062775

Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Commit-Queue: Manos Koukoutos <mano...@chromium.org>

Git Watcher via monorail

unread,
Feb 22, 2024, 12:47:14 PM2/22/24
to v8-re...@googlegroups.com

Git Watcher via monorail

unread,
Mar 18, 2024, 6:22:15 AM3/18/24
to v8-re...@googlegroups.com

Comment #19 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c19


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/5f1342c20b5932c170c4c113dd4e78f6e25fdad3

commit 5f1342c20b5932c170c4c113dd4e78f6e25fdad3
Author: Matthias Liedtke <mlie...@chromium.org>
Date: Mon Mar 18 09:36:29 2024

[wasm][exnref] Fix broken abstract casts

ref.test, ref.cast, br_on_cast, br_on_cast_fail allow arbitrary heap
types, so they also allow exnref and noexnref.

This CL also fixes the missing type checks in the js to wasm wrapper.

Bug: v8:14398
Change-Id: Ieefb9a8e99d3d7a4b175db60f55b7fa9a96c5203
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5372489
Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Commit-Queue: Matthias Liedtke <mlie...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#92867}

[modify] https://crrev.com/5f1342c20b5932c170c4c113dd4e78f6e25fdad3/test/mjsunit/wasm/js-wrapper-typechecks.js
[modify] https://crrev.com/5f1342c20b5932c170c4c113dd4e78f6e25fdad3/src/compiler/wasm-compiler.cc
[modify] https://crrev.com/5f1342c20b5932c170c4c113dd4e78f6e25fdad3/src/wasm/graph-builder-interface.cc
[modify] https://crrev.com/5f1342c20b5932c170c4c113dd4e78f6e25fdad3/test/mjsunit/wasm/gc-casts-invalid.js
[modify] https://crrev.com/5f1342c20b5932c170c4c113dd4e78f6e25fdad3/src/wasm/wrappers.cc
[modify] https://crrev.com/5f1342c20b5932c170c4c113dd4e78f6e25fdad3/src/compiler/wasm-gc-lowering.cc
[modify] https://crrev.com/5f1342c20b5932c170c4c113dd4e78f6e25fdad3/test/mjsunit/wasm/wasm-module-builder.js
[modify] https://crrev.com/5f1342c20b5932c170c4c113dd4e78f6e25fdad3/src/wasm/baseline/liftoff-compiler.cc
[add] https://crrev.com/5f1342c20b5932c170c4c113dd4e78f6e25fdad3/test/mjsunit/wasm/gc-casts-exnref.js
[modify] https://crrev.com/5f1342c20b5932c170c4c113dd4e78f6e25fdad3/src/wasm/function-body-decoder-impl.h
[modify] https://crrev.com/5f1342c20b5932c170c4c113dd4e78f6e25fdad3/src/compiler/turboshaft/wasm-lowering-reducer.h

Git Watcher via monorail

unread,
Mar 21, 2024, 9:18:18 AM3/21/24
to v8-re...@googlegroups.com

Git Watcher via monorail

unread,
Apr 2, 2024, 5:19:16 AM4/2/24
to v8-re...@googlegroups.com

Comment #21 on issue 14398 by Git Watcher: Implement the new wasm Exception Handling proposal
https://bugs.chromium.org/p/v8/issues/detail?id=14398#c21


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/c734674e03f9d065312c77016dc61bf046692429

commit c734674e03f9d065312c77016dc61bf046692429
Author: Manos Koukoutos <mano...@chromium.org>
Date: Mon Apr 01 07:23:04 2024

[wasm][exnref] Fix null value for constant expressions

Bug: v8:14398
Change-Id: Ia00d2de97a897d608d6c043b6e267c7d6313a18b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5402583
Auto-Submit: Manos Koukoutos <mano...@chromium.org>
Commit-Queue: Thibaud Michaud <thib...@chromium.org>
Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#93107}

[modify] https://crrev.com/c734674e03f9d065312c77016dc61bf046692429/src/wasm/constant-expression-interface.cc
Reply all
Reply to author
Forward
0 new messages