[Webkit-unassigned] [Bug 234971] New: JSC::JSWebAssemblyModule::createStub() falls through ASSERT_NOT_REACHED()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 7 11:13:57 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=234971
Bug ID: 234971
Summary: JSC::JSWebAssemblyModule::createStub() falls through
ASSERT_NOT_REACHED()
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ddkilzer at webkit.org
Depends on: 234932
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.
Referenced Bugs:
https://bugs.webkit.org/show_bug.cgi?id=234932
[Bug 234932] check-webkit-style: add checker for unexpected fall through after ASSERT_NOT_REACHED() statements
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220107/b5d5fc76/attachment.htm>
More information about the webkit-unassigned
mailing list