[Webkit-unassigned] [Bug 234986] New: WebsiteDataStore.cpp uses switch statements for WebKit::ProcessAccessType enum that fall through ASSERT_NOT_REACHED()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 7 14:23:51 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=234986
Bug ID: 234986
Summary: WebsiteDataStore.cpp uses switch statements for
WebKit::ProcessAccessType enum that fall through
ASSERT_NOT_REACHED()
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit2
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ddkilzer at webkit.org
CC: bfulgham at webkit.org, kkinnunen at apple.com,
webkit-bug-importer at group.apple.com
Depends on: 234932
WebsiteDataStore.cpp uses switch statements for WebKit::ProcessAccessType enum that fall through ASSERT_NOT_REACHED().
In these cases, it's not clear whether the statement after the switch() statement should be run for every WebKit::ProcessAccessType enum value.
auto webProcessAccessType = computeWebProcessAccessTypeForDataFetch(dataTypes, !isPersistent());
if (webProcessAccessType != ProcessAccessType::None) {
for (auto& process : processes()) {
switch (webProcessAccessType) {
case ProcessAccessType::OnlyIfLaunched:
if (process.state() != WebProcessProxy::State::Running)
continue;
break;
case ProcessAccessType::Launch:
// FIXME: Handle this.
ASSERT_NOT_REACHED();
break;
case ProcessAccessType::None:
ASSERT_NOT_REACHED();
}
process.fetchWebsiteData(m_sessionID, dataTypes, [callbackAggregator](WebsiteData websiteData) {
callbackAggregator->addWebsiteData(WTFMove(websiteData));
});
}
}
See Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp.
There are seven places where this occurs (in four switch statements):
ERROR: Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:482: ASSERT_NOT_REACHED() statement fallthrough may result in unexpected code execution. [security/assertion_fallthrough] [4]
ERROR: Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:486: ASSERT_NOT_REACHED() statement fallthrough may result in unexpected code execution. [security/assertion_fallthrough] [4]
ERROR: Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:664: ASSERT_NOT_REACHED() statement fallthrough may result in unexpected code execution. [security/assertion_fallthrough] [4]
ERROR: Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:668: ASSERT_NOT_REACHED() statement fallthrough may result in unexpected code execution. [security/assertion_fallthrough] [4]
ERROR: Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:751: ASSERT_NOT_REACHED() statement fallthrough may result in unexpected code execution. [security/assertion_fallthrough] [4]
ERROR: Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:783: ASSERT_NOT_REACHED() statement fallthrough may result in unexpected code execution. [security/assertion_fallthrough] [4]
ERROR: Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:787: ASSERT_NOT_REACHED() statement fallthrough may result in unexpected code execution. [security/assertion_fallthrough] [4]
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/56396fb6/attachment.htm>
More information about the webkit-unassigned
mailing list