Bug 149309 - Null dereference loading Blink layout test http/tests/misc/detach-during-notifyDone.html
Summary: Null dereference loading Blink layout test http/tests/misc/detach-during-noti...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jiewen Tan
URL:
Keywords: BlinkMergeCandidate, HasReduction, InRadar
Depends on:
Blocks:
 
Reported: 2015-09-17 15:52 PDT by Jon Honeycutt
Modified: 2016-02-05 20:37 PST (History)
8 users (show)

See Also:


Attachments
crashing test (213 bytes, text/html)
2015-09-17 15:52 PDT, Jon Honeycutt
no flags Details
resources for the test (407 bytes, text/html)
2015-10-12 15:45 PDT, Jiewen Tan
no flags Details
Patch (16.96 KB, patch)
2015-11-16 15:25 PST, Jiewen Tan
bfulgham: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Honeycutt 2015-09-17 15:52:59 PDT
Created attachment 261447 [details]
crashing test

Null dereference loading Blink layout test http/tests/misc/detach-during-notifyDone.html.

Stack trace:

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000a70
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0xa70:
--> 
    __TEXT                 00000001042b3000-00000001042b5000 [    8K] r-x/rwx SM=COW  /Users/USER/*/WebKit.framework/Versions/A/XPCServices/com.apple.WebKit.WebContent.Development.xpc/Contents/MacOS/com.apple.WebKit.WebContent.Development

Application Specific Information:
CRASHING TEST: temp-tests/http/tests/misc/detach-during-notifyDone.html

Global Trace Buffer (reverse chronological seconds):
55.805806    AppleJPEG                 	0x00007fff8a01b11c [0x7fef4f80b200] Decoding completed without errors
55.805806    AppleJPEG                 	0x00007fff8a0190fc [0x7fef4f80b200] Options: 128x128 [FFFFFFFF,FFFFFFFF] 00025060
55.805806    AppleJPEG                 	0x00007fff8a018fae [0x7fef4f80b200] Decoding: C0 0x00800080 0x0010354A 0x11111100 0x00000000 38616
55.805806    AppleJPEG                 	0x00007fff8a01805e [0x7fef4f80b200] Created session
55.805806    AppleJPEG                 	0x00007fff8a018a11 [0x7fef4f80b200] Releasing session
55.808161    AppleJPEG                 	0x00007fff8a01805e [0x7fef4f80b200] Created session
56.180187    CFNetwork                 	0x00007fff88d43b97 Explicitly setting CF cookie storage singleton
56.180561    CFNetwork                 	0x00007fff88d8f211 Explicitly setting cookie storage singleton

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebKit              	0x000000010a884144 WebKit::WebFrameLoaderClient::dispatchDidFinishLoad() + 102 (WebDocumentLoader.h:40)
1   com.apple.WebCore             	0x000000010c3d0ad2 WebCore::FrameLoader::checkLoadCompleteForThisFrame() + 594 (FrameLoader.cpp:2286)
2   com.apple.WebCore             	0x000000010c3c73b6 WebCore::FrameLoader::checkLoadComplete() + 438 (FrameLoader.cpp:2465)
3   com.apple.WebCore             	0x000000010c25da80 WebCore::DocumentLoader::finishedLoading(double) + 416 (DocumentLoader.cpp:439)
4   com.apple.WebCore             	0x000000010c08e179 WebCore::CachedResource::checkNotify() + 153 (CachedResourceClientWalker.h:51)
5   com.apple.WebCore             	0x000000010c08a433 WebCore::CachedRawResource::finishLoading(WebCore::SharedBuffer*) + 227 (CachedRawResource.cpp:104)
6   com.apple.WebCore             	0x000000010ce05501 WebCore::SubresourceLoader::didFinishLoading(double) + 1153 (ResourceLoader.h:154)
7   com.apple.WebKit              	0x000000010a94b98d WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&, IPC::MessageDecoder&) + 561 (HandleMessage.h:16)
8   com.apple.WebKit              	0x000000010a7251f1 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >) + 127 (memory:2636)
9   com.apple.WebKit              	0x000000010a727b4a IPC::Connection::dispatchOneMessage() + 126 (memory:2656)
10  com.apple.JavaScriptCore      	0x000000010bb69985 WTF::RunLoop::performWork() + 437 (functional:1742)
11  com.apple.JavaScriptCore      	0x000000010bb69d32 WTF::RunLoop::performWork(void*) + 34 (RunLoopCF.cpp:39)
12  com.apple.CoreFoundation      	0x00007fff949e2c01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
13  com.apple.CoreFoundation      	0x00007fff949d4b1c __CFRunLoopDoSources0 + 556
14  com.apple.CoreFoundation      	0x00007fff949d403f __CFRunLoopRun + 927
15  com.apple.CoreFoundation      	0x00007fff949d3a38 CFRunLoopRunSpecific + 296
16  com.apple.HIToolbox           	0x00007fff88e673bd RunCurrentEventLoopInMode + 235
17  com.apple.HIToolbox           	0x00007fff88e67153 ReceiveNextEventCommon + 432
18  com.apple.HIToolbox           	0x00007fff88e66f93 _BlockUntilNextEventMatchingListInModeWithFilter + 71
19  com.apple.AppKit              	0x00007fff870b81e7 _DPSNextEvent + 1076
20  com.apple.AppKit              	0x00007fff8748490d -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
21  com.apple.AppKit              	0x00007fff870ae0b8 -[NSApplication run] + 682
22  com.apple.AppKit              	0x00007fff87030396 NSApplicationMain + 1176
23  libxpc.dylib                  	0x00007fff8c70ff70 _xpc_objc_main + 793
24  libxpc.dylib                  	0x00007fff8c7116bf xpc_main + 494
25  com.apple.WebKit.WebContent.Development	0x00000001042b4424 main + 409 (XPCServiceMain.Development.mm:187)
26  libdyld.dylib                 	0x00007fff93aa15ad start + 1
Comment 1 Radar WebKit Bug Importer 2015-09-17 15:53:17 PDT
<rdar://problem/22748363>
Comment 2 Jiewen Tan 2015-10-12 15:45:30 PDT
Created attachment 262931 [details]
resources for the test
Comment 3 Jiewen Tan 2015-10-12 15:59:13 PDT
Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000bd8
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0xbd8:
--> 
    __TEXT                 0000000105144000-0000000105147000 [   12K] r-x/rwx SM=COW  /Users/USER/Documents/*/WebKit.framework/Versions/A/XPCServices/com.apple.WebKit.WebContent.Development.xpc/Contents/MacOS/com.apple.WebKit.WebContent.Development

Application Specific Information:
CRASHING TEST: /misc/detach-during-notifyDone.html

Global Trace Buffer (reverse chronological seconds):
18446744066.815662 CFNetwork                 	0x00007fff929903eb Explicitly setting CF cookie storage singleton
18446744066.815979 CFNetwork                 	0x00007fff929c6c85 Explicitly setting cookie storage singleton

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebKit              	0x0000000109bfb28c WebKit::WebDocumentLoader::navigationID() const + 12 (WebDocumentLoader.h:40)
1   com.apple.WebKit              	0x0000000109bf590d WebKit::WebFrameLoaderClient::dispatchDidFinishLoad() + 173 (WebFrameLoaderClient.cpp:553)
2   com.apple.WebCore             	0x000000010f6f380d WebCore::FrameLoader::checkLoadCompleteForThisFrame() + 1853 (FrameLoader.cpp:2283)
3   com.apple.WebCore             	0x000000010f6eb850 WebCore::FrameLoader::checkLoadComplete() + 320 (FrameLoader.cpp:2461)
4   com.apple.WebCore             	0x000000010f3bb48f WebCore::DocumentLoader::finishedLoading(double) + 495 (DocumentLoader.cpp:446)
5   com.apple.WebCore             	0x000000010f3bb20e WebCore::DocumentLoader::notifyFinished(WebCore::CachedResource*) + 270 (DocumentLoader.cpp:385)
6   com.apple.WebCore             	0x000000010ef6f4c2 WebCore::CachedResource::checkNotify() + 130 (CachedResource.cpp:296)
7   com.apple.WebCore             	0x000000010ef6f5d1 WebCore::CachedResource::finishLoading(WebCore::SharedBuffer*) + 49 (CachedResource.cpp:314)
8   com.apple.WebCore             	0x000000010ef6b00a WebCore::CachedRawResource::finishLoading(WebCore::SharedBuffer*) + 218 (CachedRawResource.cpp:104)
9   com.apple.WebCore             	0x0000000110cb0215 WebCore::SubresourceLoader::didFinishLoading(double) + 517 (SubresourceLoader.cpp:374)
10  com.apple.WebKit              	0x0000000109f0d877 WebKit::WebResourceLoader::didFinishResourceLoad(double) + 151 (WebResourceLoader.cpp:156)
11  com.apple.WebKit              	0x0000000109f12d43 void IPC::callMemberFunctionImpl<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(double), std::__1::tuple<double>, 0ul>(WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(double), std::__1::tuple<double>&&, std::index_sequence<0ul>) + 163 (HandleMessage.h:17)
12  com.apple.WebKit              	0x0000000109f12c98 void IPC::callMemberFunction<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(double), std::__1::tuple<double>, std::make_index_sequence<1ul> >(std::__1::tuple<double>&&, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(double)) + 88 (HandleMessage.h:23)
13  com.apple.WebKit              	0x0000000109f11dcd void IPC::handleMessage<Messages::WebResourceLoader::DidFinishResourceLoad, WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(double)>(IPC::MessageDecoder&, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(double)) + 221 (HandleMessage.h:93)
14  com.apple.WebKit              	0x0000000109f1157c WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&, IPC::MessageDecoder&) + 636 (WebResourceLoaderMessageReceiver.cpp:68)
15  com.apple.WebKit              	0x0000000109818410 WebKit::NetworkProcessConnection::didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) + 160 (NetworkProcessConnection.cpp:62)
16  com.apple.WebKit              	0x00000001095cf023 IPC::Connection::dispatchMessage(IPC::MessageDecoder&) + 51 (Connection.cpp:901)
17  com.apple.WebKit              	0x00000001095c5f51 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >) + 785 (Connection.cpp:933)
18  com.apple.WebKit              	0x00000001095cf61f IPC::Connection::dispatchOneMessage() + 1519 (Connection.cpp:962)
19  com.apple.WebKit              	0x00000001095e097d IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >)::$_10::operator()() const + 29 (Connection.cpp:895)
20  com.apple.WebKit              	0x00000001095e094d void std::__1::__invoke_void_return_wrapper<void>::__call<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >)::$_10&>(IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >)::$_10&&&) + 45 (__functional_base:441)
21  com.apple.WebKit              	0x00000001095e079c std::__1::__function::__func<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >)::$_10, std::__1::allocator<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >)::$_10>, void ()>::operator()() + 44 (functional:1407)
22  com.apple.JavaScriptCore      	0x000000010cda768a std::__1::function<void ()>::operator()() const + 26 (functional:1793)
23  com.apple.JavaScriptCore      	0x000000010d34afed WTF::RunLoop::performWork() + 621 (RunLoop.cpp:122)
24  com.apple.JavaScriptCore      	0x000000010d34b5f4 WTF::RunLoop::performWork(void*) + 36 (RunLoopCF.cpp:38)
25  com.apple.CoreFoundation      	0x00007fff88dea621 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
26  com.apple.CoreFoundation      	0x00007fff88dc9e1c __CFRunLoopDoSources0 + 556
27  com.apple.CoreFoundation      	0x00007fff88dc933f __CFRunLoopRun + 927
28  com.apple.CoreFoundation      	0x00007fff88dc8d38 CFRunLoopRunSpecific + 296
29  com.apple.HIToolbox           	0x00007fff83b01d55 RunCurrentEventLoopInMode + 235
30  com.apple.HIToolbox           	0x00007fff83b01b8f ReceiveNextEventCommon + 432
31  com.apple.HIToolbox           	0x00007fff83b019cf _BlockUntilNextEventMatchingListInModeWithFilter + 71
32  com.apple.AppKit              	0x00007fff8a645f3a _DPSNextEvent + 1067
33  com.apple.AppKit              	0x00007fff8a645369 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
34  com.apple.AppKit              	0x00007fff8a639ecc -[NSApplication run] + 682
35  com.apple.AppKit              	0x00007fff8a603162 NSApplicationMain + 1176
36  libxpc.dylib                  	0x00007fff970904f2 _xpc_objc_main + 793
37  libxpc.dylib                  	0x00007fff9708ef1e xpc_main + 494
38  com.apple.WebKit.WebContent.Development	0x0000000105145be1 main + 785 (XPCServiceMain.Development.mm:187)
39  libdyld.dylib                 	0x00007fff84d425ad start + 1
Comment 4 Jiewen Tan 2015-10-13 14:57:50 PDT
Here is the way to reproduce the bug:
Jiewens-Mac-Pro:LayoutTests jwtan$ run-webkit-tests -g --repeat-each=10 http/tests/misc/detach-during-notifyDone.html
Using port 'mac-elcapitan-wk2'
Test configuration: <elcapitan, x86_64, debug>
Placing test results in /Users/jwtan/Documents/Build/Products/Debug/layout-test-results
Baseline search path: mac-wk2 -> wk2 -> mac -> generic
Using Debug build
Pixel tests disabled
Regular timeout: 350000, slow test timeout: 1750000
Command line: /Users/jwtan/Documents/Build/Products/Debug/WebKitTestRunner -

--lint-test-files warnings:
LayoutTests/platform/mac/TestExpectations:973 Path does not exist. media/video-double.html

Found 1 test; running 1 (10 times each: --repeat-each=10 --iterations=1), skipping 0.
Running 1 WebKitTestRunner.     

[2/10] http/tests/misc/detach-during-notifyDone.html failed unexpectedly (com.apple.WebKit.WebContent.Development crashed [pid=89460])
[4/10] http/tests/misc/detach-during-notifyDone.html failed unexpectedly (com.apple.WebKit.WebContent.Development crashed [pid=89557])
[6/10] http/tests/misc/detach-during-notifyDone.html failed unexpectedly (com.apple.WebKit.WebContent.Development crashed [pid=89562])
[8/10] http/tests/misc/detach-during-notifyDone.html failed unexpectedly (com.apple.WebKit.WebContent.Development crashed [pid=89566])
[10/10] http/tests/misc/detach-during-notifyDone.html failed unexpectedly (com.apple.WebKit.WebContent.Development crashed [pid=89571])
                        
Retrying 1 unexpected failure ...

Running 1 WebKitTestRunner.

                                                   
5 tests ran as expected, 5 didn't:


Regressions: Unexpected crashes (1)
  http/tests/misc/detach-during-notifyDone.html [ Crash ]
Comment 5 Jiewen Tan 2015-10-13 14:58:15 PDT
Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000bd8
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
This process is running with libgmalloc.dylib (GuardMalloc) which may have forced the crash due to a memory access error.
 
CRASHING TEST: /misc/detach-during-notifyDone.html

Global Trace Buffer (reverse chronological seconds):
18446743968.919937 CFNetwork                 	0x00007fff929903eb Explicitly setting CF cookie storage singleton
18446743968.920921 CFNetwork                 	0x00007fff929c6c85 Explicitly setting cookie storage singleton

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebKit              	0x000000011c79b28c WebKit::WebDocumentLoader::navigationID() const + 12 (WebDocumentLoader.h:40)
1   com.apple.WebKit              	0x000000011c79590d WebKit::WebFrameLoaderClient::dispatchDidFinishLoad() + 173 (WebFrameLoaderClient.cpp:553)
2   com.apple.WebCore             	0x00000001222a489d WebCore::FrameLoader::checkLoadCompleteForThisFrame() + 1853 (FrameLoader.cpp:2283)
3   com.apple.WebCore             	0x000000012229c8e0 WebCore::FrameLoader::checkLoadComplete() + 320 (FrameLoader.cpp:2461)
4   com.apple.WebCore             	0x0000000121f6c51f WebCore::DocumentLoader::finishedLoading(double) + 495 (DocumentLoader.cpp:446)
5   com.apple.WebCore             	0x0000000121f6c29e WebCore::DocumentLoader::notifyFinished(WebCore::CachedResource*) + 270 (DocumentLoader.cpp:385)
6   com.apple.WebCore             	0x0000000121b20622 WebCore::CachedResource::checkNotify() + 130 (CachedResource.cpp:296)
7   com.apple.WebCore             	0x0000000121b20731 WebCore::CachedResource::finishLoading(WebCore::SharedBuffer*) + 49 (CachedResource.cpp:314)
8   com.apple.WebCore             	0x0000000121b1c16a WebCore::CachedRawResource::finishLoading(WebCore::SharedBuffer*) + 218 (CachedRawResource.cpp:104)
9   com.apple.WebCore             	0x0000000123861295 WebCore::SubresourceLoader::didFinishLoading(double) + 517 (SubresourceLoader.cpp:374)
10  com.apple.WebKit              	0x000000011caad877 WebKit::WebResourceLoader::didFinishResourceLoad(double) + 151 (WebResourceLoader.cpp:156)
11  com.apple.WebKit              	0x000000011cab2d43 void IPC::callMemberFunctionImpl<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(double), std::__1::tuple<double>, 0ul>(WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(double), std::__1::tuple<double>&&, std::index_sequence<0ul>) + 163 (HandleMessage.h:17)
12  com.apple.WebKit              	0x000000011cab2c98 void IPC::callMemberFunction<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(double), std::__1::tuple<double>, std::make_index_sequence<1ul> >(std::__1::tuple<double>&&, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(double)) + 88 (HandleMessage.h:23)
13  com.apple.WebKit              	0x000000011cab1dcd void IPC::handleMessage<Messages::WebResourceLoader::DidFinishResourceLoad, WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(double)>(IPC::MessageDecoder&, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(double)) + 221 (HandleMessage.h:93)
14  com.apple.WebKit              	0x000000011cab157c WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&, IPC::MessageDecoder&) + 636 (WebResourceLoaderMessageReceiver.cpp:68)
15  com.apple.WebKit              	0x000000011c3b8410 WebKit::NetworkProcessConnection::didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) + 160 (NetworkProcessConnection.cpp:62)
16  com.apple.WebKit              	0x000000011c16f023 IPC::Connection::dispatchMessage(IPC::MessageDecoder&) + 51 (Connection.cpp:901)
17  com.apple.WebKit              	0x000000011c165f51 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >) + 785 (Connection.cpp:933)
18  com.apple.WebKit              	0x000000011c16f61f IPC::Connection::dispatchOneMessage() + 1519 (Connection.cpp:962)
19  com.apple.WebKit              	0x000000011c18097d IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >)::$_10::operator()() const + 29 (Connection.cpp:895)
20  com.apple.WebKit              	0x000000011c18094d void std::__1::__invoke_void_return_wrapper<void>::__call<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >)::$_10&>(IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >)::$_10&&&) + 45 (__functional_base:441)
21  com.apple.WebKit              	0x000000011c18079c std::__1::__function::__func<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >)::$_10, std::__1::allocator<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >)::$_10>, void ()>::operator()() + 44 (functional:1407)
22  com.apple.JavaScriptCore      	0x000000011f95368a std::__1::function<void ()>::operator()() const + 26 (functional:1793)
23  com.apple.JavaScriptCore      	0x000000011fef6fed WTF::RunLoop::performWork() + 621 (RunLoop.cpp:122)
24  com.apple.JavaScriptCore      	0x000000011fef75f4 WTF::RunLoop::performWork(void*) + 36 (RunLoopCF.cpp:38)
25  com.apple.CoreFoundation      	0x00007fff88dea621 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
26  com.apple.CoreFoundation      	0x00007fff88dc9e1c __CFRunLoopDoSources0 + 556
27  com.apple.CoreFoundation      	0x00007fff88dc933f __CFRunLoopRun + 927
28  com.apple.CoreFoundation      	0x00007fff88dc8d38 CFRunLoopRunSpecific + 296
29  com.apple.HIToolbox           	0x00007fff83b01d55 RunCurrentEventLoopInMode + 235
30  com.apple.HIToolbox           	0x00007fff83b01b8f ReceiveNextEventCommon + 432
31  com.apple.HIToolbox           	0x00007fff83b019cf _BlockUntilNextEventMatchingListInModeWithFilter + 71
32  com.apple.AppKit              	0x00007fff8a645f3a _DPSNextEvent + 1067
33  com.apple.AppKit              	0x00007fff8a645369 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
34  com.apple.AppKit              	0x00007fff8a639ecc -[NSApplication run] + 682
35  com.apple.AppKit              	0x00007fff8a603162 NSApplicationMain + 1176
36  libxpc.dylib                  	0x00007fff970904f2 _xpc_objc_main + 793
37  libxpc.dylib                  	0x00007fff9708ef1e xpc_main + 494
38  com.apple.WebKit.WebContent.Development	0x000000010fca2be1 main + 785 (XPCServiceMain.Development.mm:187)
39  libdyld.dylib                 	0x00007fff84d425ad start + 1
Comment 6 Jiewen Tan 2015-11-16 15:25:34 PST
Created attachment 265628 [details]
Patch
Comment 7 Brent Fulgham 2015-11-30 15:39:13 PST
Comment on attachment 265628 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=265628&action=review

r=me. Please consider using the reverse iterator, but it's not required before landing this change.

> Source/WebCore/ChangeLog:9
> +        A wired order of event execution introduced by the test case will kill the webpage in a

I think you meant "A weird order..."

> Source/WebCore/ChangeLog:11
> +        Therefore, any frames comes after this subframe will have no page. Check it before calling

This should be "Therefore, any frames that come after the failing subframe will have no page."

> Source/WebCore/loader/FrameLoader.cpp:2434
> +    for (unsigned i = frames.size(); i; --i) {

I think this might be better written as something like:

for (auto frame = frames.rbegin(); frame != frames.rend(); ++frame) {
    if (frame->page())
        frame->loader().checkLoadCompleteForThisFrame();
}
Comment 8 Jiewen Tan 2015-11-30 16:33:59 PST
Committed r192844: <http://trac.webkit.org/changeset/192844>
Comment 9 Michael Catanzaro 2016-02-05 20:37:57 PST
This test often crashes for GTK, bug #153937