RESOLVED DUPLICATE of bug 274636234971
JSC::JSWebAssemblyModule::createStub() falls through ASSERT_NOT_REACHED()
https://bugs.webkit.org/show_bug.cgi?id=234971
Summary JSC::JSWebAssemblyModule::createStub() falls through ASSERT_NOT_REACHED()
David Kilzer (:ddkilzer)
Reported 2022-01-07 11:13:57 PST
JSC::JSWebAssemblyModule::createStub() falls through ASSERT_NOT_REACHED(). These fall-throughs should either use RELEASE_ASSERT_NOT_REACHED(), or add a `return nullptr;` statement after ASSERT_NOT_REACHED(). Presumably the switch statement will never fall through unless there is memory corruption, so a RELEASE_ASSERT_NOT_REACHED() would catch such corruption much earlier. JSWebAssemblyModule* JSWebAssemblyModule::createStub(VM& vm, JSGlobalObject* globalObject, Structure* structure, Wasm::Module::ValidationResult&& result) { [...] auto error = module->generateWasmToJSStubs(vm); if (UNLIKELY(!error)) { switch (error.error()) { case Wasm::BindingFailure::OutOfMemory: throwException(globalObject, scope, createJSWebAssemblyLinkError(globalObject, vm, "Out of executable memory"_s)); return nullptr; } ASSERT_NOT_REACHED(); } return module; } See Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.cpp.
Attachments
Radar WebKit Bug Importer
Comment 1 2022-01-07 11:14:34 PST
Sergey Rubanov
Comment 2 2026-07-15 03:50:23 PDT
createStub() was removed when stub generation moved to compiler threads (bug https://bugs.webkit.org/show_bug.cgi?id=274721 / https://github.com/WebKit/WebKit/commit/c9a03e0c8a96). The ASSERT_NOT_REACHED fall-through is gone. Closing as RESOLVED / FIXED.
David Kilzer (:ddkilzer)
Comment 3 2026-07-17 20:44:35 PDT
This code was removed from WebKit in 279275@main (bug 274636, rdar://128663255), which deleted the ASSERT_NOT_REACHED() fall-through along with generateWasmToJSStubs().
David Kilzer (:ddkilzer)
Comment 4 2026-07-17 20:44:51 PDT
*** This bug has been marked as a duplicate of bug 274636 ***
Note You need to log in before you can comment on or make changes to this bug.