Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[CoreIPC] Crash in logDiagnosticMessage code
https://bugs.webkit.org/show_bug.cgi?id=224390 Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-04-12 Reviewed by Chris Dumez. Source/WebKit: Create new WebPageProxy::logDiagnosticMessage APIs designed to be called on messages that need sanity checking, and hook that up to IPC handlers (while leaving existing APIs for all other callers). Test: ipc/analytics-logger-crash.html * NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::logDiagnosticMessageWithValue): * UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::logDiagnosticMessageFromWebProcess): (WebKit::ProvisionalPageProxy::logDiagnosticMessageWithEnhancedPrivacyFromWebProcess): (WebKit::ProvisionalPageProxy::logDiagnosticMessageWithValueDictionaryFromWebProcess): (WebKit::ProvisionalPageProxy::didReceiveMessage): * UIProcess/ProvisionalPageProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::logDiagnosticMessageFromWebProcess): (WebKit::WebPageProxy::logDiagnosticMessageWithResultFromWebProcess): (WebKit::WebPageProxy::logDiagnosticMessageWithValueFromWebProcess): (WebKit::WebPageProxy::logDiagnosticMessageWithEnhancedPrivacyFromWebProcess): (WebKit::WebPageProxy::logDiagnosticMessageWithValueDictionaryFromWebProcess): (WebKit::WebPageProxy::logDiagnosticMessageWithDomainFromWebProcess): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp: (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage): (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult): (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue): (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy): (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValueDictionary): (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithDomain): LayoutTests: Add a test for this crasher. * ipc/analytics-logger-crash-expected.txt: Added. * ipc/analytics-logger-crash.html: Added. Canonical link: https://commits.webkit.org/236426@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
e13df4b
commit cafdeafa951ea5a9c8fcb4737c83b38f20761ab8
Showing
11 changed files
with
174 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This test passes if it does not crash. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html><!-- webkit-test-runner [ IPCTestingAPIEnabled=true ] --> | ||
<html> | ||
<head> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.dumpAsText(); | ||
|
||
if (window.IPC) { | ||
buf = new Uint8Array([0x21,0x0,0x0,0x0,0x0,0x0,0x0,0x21,0x0,0x0,0x0,0x0,0x0,0x0,0x21,0x0,0x0,0x0,0x0,0x0,0x0, | ||
0x21,0x0,0x0,0x0,0x0,0x0,0x0,0x21,0x0,0x0,0x0,0x0,0x0,0x0,0x21,0x0,0x0,0x0,0x0,0x0,0xfb,0x20,0x0,0x0,0x0, | ||
0x0,0x0,0x0,0x21,0x0,0x0,0x0,0x0,0x0,0x0,0x21,0xda,0xe,0xef,0xd,0x0,0x0,0x21,0x0,0x0,0x0,0x0,0x0,0x0,0x21, | ||
0x0,0x0,0x0,0x0,0x0,0x21,0x1,0x0,0x0,0x0,0x0,0x0,0x21,0x0,0x0,0x0,0x0,0x0,0x21,0x0,0x0,0x0,]); | ||
IPC.sendMessage('UI',IPC.webPageProxyID,IPC.messages.WebPageProxy_LogDiagnosticMessageWithValueFromWebProcess.name,[buf]); | ||
} | ||
</script> | ||
<body> | ||
This test passes if it does not crash. | ||
</body> | ||
</head> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.