Bug 242077 - The catchability of WASM stack overflow exceptions should match the spec
Summary: The catchability of WASM stack overflow exceptions should match the spec
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebAssembly (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Justin Michaud
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-06-28 12:10 PDT by Justin Michaud
Modified: 2024-03-26 08:51 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Michaud 2022-06-28 12:10:59 PDT
We currently allow stack overflow exceptions from within wasm code to be caught by a catch_all block, which does not match v8.

Wasm stack overflows are specified to be the same type as JS stack overflows:

https://webassembly.github.io/exception-handling/js-api/index.html#js-exceptions

The proposal says that these are not catchable:

https://github.com/WebAssembly/exception-handling/issues/202

But I cannot find that this is specified in the formal spec:

https://webassembly.github.io/exception-handling/js-api/index.html#errors

We are probably doing the wrong thing here, but maybe we should file a spec bug too.
Comment 1 Radar WebKit Bug Importer 2022-07-05 12:11:15 PDT
<rdar://problem/96459590>
Comment 2 Keith Miller 2024-03-26 08:51:07 PDT
As far as I can tell from https://github.com/WebAssembly/exception-handling/issues/202 it seems like we're doing the right thing already. "#218 (comment) basically says, if JS throws an exception and it passes through Wasm (either by not being caught or being caught and rethrown) the exception object you will get is the same as the one you threw." Seems to imply that JS exceptions should be catchall-able.