[webkit-changes] [WebKit/WebKit] a6a933: [JSC] Fix wasm extended constant expressions in ex...
jjgriego
noreply at github.com
Tue Oct 24 08:55:47 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a6a933a795b3a4bae2c7cb8ebe9f60406f0927bf
https://github.com/WebKit/WebKit/commit/a6a933a795b3a4bae2c7cb8ebe9f60406f0927bf
Author: Joseph Griego <jgriego at igalia.com>
Date: 2023-10-24 (Tue, 24 Oct 2023)
Changed paths:
M Source/JavaScriptCore/wasm/WasmOperations.cpp
M Source/JavaScriptCore/wasm/WasmOperationsInlines.h
M Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.cpp
M Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.h
Log Message:
-----------
[JSC] Fix wasm extended constant expressions in exception-scope-verification builds
https://bugs.webkit.org/show_bug.cgi?id=263444
Reviewed by Justin Michaud.
In debug/`ENABLE(EXCEPTION_SCOPE_VERIFICATION)` builds, we aren't following all
the rules: `JSWebAssemblyStruct::tryCreate` throws if certain wasm operations
aren't enabled, but we're calling it from a context (WasmConstExprGenerator)
that isn't trivial to decorate with a ThrowScope (because it cooperates with
the wasm FunctionParser)
For now, change `tryCreate` to be total (except for OOMs which still assert),
and rename it to `create`... since, at present, it it always called from
contexts [1] where we know the runtime options are set anyways.
[1] It is also called from the wasm slow path `struct_new` and
`operationWasmStructNew` but these are unreachable unless wasm is enabled and
the LLIntGenerator or similar checks the runtime option too)
* Source/JavaScriptCore/wasm/WasmOperations.cpp:
(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/wasm/WasmOperationsInlines.h:
(JSC::Wasm::structNew):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.cpp:
(JSC::JSWebAssemblyStruct::create):
(JSC::JSWebAssemblyStruct::tryCreate): Deleted.
* Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.h:
Canonical link: https://commits.webkit.org/269718@main
More information about the webkit-changes
mailing list