Bug 203837

Summary: Adding logging to diagnose crashes resulting from provisional document loader unexpectedly being nullptr
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Page LoadingAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, cdumez, dbates, ews-watchlist, ggaren, japhet, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Adds logging ggaren: review+

Description Ryosuke Niwa 2019-11-04 19:28:54 PST
We're getting nullptr crashes in various loader code where the provisional document loader unexpectedly is nullptr.
e.g.

0   com.apple.WebKit              	0x0000000108f75a75 WebKit::WebFrameLoaderClient::dispatchDidChangeProvisionalURL() + 67
1   com.apple.WebCore             	0x000000010ae9c909 WebCore::DocumentLoader::willSendRequest(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&) + 1465
2   com.apple.WebCore             	0x000000010ae9cc46 non-virtual thunk to WebCore::DocumentLoader::redirectReceived(WebCore::CachedResource&, WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&) + 118
3   com.apple.WebCore             	0x000000010af10391 WebCore::iterateClients(WebCore::CachedResourceClientWalker<WebCore::CachedRawResourceClient>&&, WebCore::CachedResourceHandle<WebCore::CachedRawResource>&&, WebCore::ResourceRequest&&, std::__1::unique_ptr<WebCore::ResourceResponse, std::__1::default_delete<WebCore::ResourceResponse> >&&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&) + 433
4   com.apple.WebCore             	0x000000010af10055 WebCore::CachedRawResource::redirectReceived(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&) + 1285
5   com.apple.WebCore             	0x000000010aee7cae WebCore::SubresourceLoader::willSendRequestInternal(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&) + 4126
6   com.apple.WebKit              	0x0000000108f4796f WebKit::WebResourceLoader::willSendRequest(WebCore::ResourceRequest&&, WebCore::ResourceResponse&&) + 457
7   com.apple.WebKit              	0x000000010907df17 WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&, IPC::Decoder&) + 423
8   com.apple.WebKit              	0x0000000108f4184c WebKit::NetworkProcessConnection::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 702
9   com.apple.WebKit              	0x0000000108b9bac2 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) + 164
10  com.apple.WebKit              	0x0000000108b9efff IPC::Connection::dispatchOneIncomingMessage() + 189
11  com.apple.JavaScriptCore      	0x000000010d289057 WTF::RunLoop::performWork() + 231
Comment 1 Ryosuke Niwa 2019-11-04 19:42:54 PST
Created attachment 382799 [details]
Adds logging
Comment 2 Radar WebKit Bug Importer 2019-11-04 19:49:51 PST
<rdar://problem/56891110>
Comment 3 Geoffrey Garen 2019-11-05 10:16:17 PST
Comment on attachment 382799 [details]
Adds logging

r=me
Comment 4 Ryosuke Niwa 2019-11-05 13:47:22 PST
Committed r252077: <https://trac.webkit.org/changeset/252077>