Bug 149294 - Null dereference loading Blink layout test editing/execCommand/insert-html-to-document-element-crash.html
Summary: Null dereference loading Blink layout test editing/execCommand/insert-html-to...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (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 14:40 PDT by Jon Honeycutt
Modified: 2015-10-26 15:04 PDT (History)
4 users (show)

See Also:


Attachments
crashing test (626 bytes, text/html)
2015-09-17 14:40 PDT, Jon Honeycutt
no flags Details
Patch (4.81 KB, patch)
2015-10-20 15:31 PDT, Jiewen Tan
no flags 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 14:40:57 PDT
Created attachment 261430 [details]
crashing test

Null dereference loading Blink layout test editing/execCommand/insert-html-to-document-element-crash.html.

Stack trace:

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

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

VM Regions Near 0x14:
--> 
    __TEXT                 000000010ced8000-000000010ceda000 [    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/editing/execCommand/insert-html-to-document-element-crash.html

Global Trace Buffer (reverse chronological seconds):
55.871846    CFNetwork                 	0x00007fff88d43b97 Explicitly setting CF cookie storage singleton
55.872230    CFNetwork                 	0x00007fff88d8f211 Explicitly setting cookie storage singleton

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebCore             	0x000000011507acfe WebCore::areIdenticalElements(WebCore::Node const*, WebCore::Node const*) + 14 (Node.h:638)
1   com.apple.WebCore             	0x000000011588720c WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline(WebCore::ReplaceSelectionCommand::InsertedNodes&) + 2092 (ReplaceSelectionCommand.cpp:533)
2   com.apple.WebCore             	0x000000011588d719 WebCore::ReplaceSelectionCommand::doApply() + 13385 (ReplaceSelectionCommand.cpp:1164)
3   com.apple.WebCore             	0x0000000114cd8216 WebCore::CompositeEditCommand::apply() + 102 (ScopedEventQueue.h:71)
4   com.apple.WebCore             	0x0000000114f0e714 WebCore::executeInsertFragment(WebCore::Frame&, WTF::PassRefPtr<WebCore::DocumentFragment>) + 84 (StdLibExtras.h:366)
5   com.apple.WebCore             	0x0000000114f0bd83 WebCore::executeInsertHTML(WebCore::Frame&, WebCore::Event*, WebCore::EditorCommandSource, WTF::String const&) + 99 (StdLibExtras.h:366)
6   com.apple.WebCore             	0x0000000114f0a876 WebCore::Editor::Command::execute(WTF::String const&, WebCore::Event*) const + 182 (EditorCommand.cpp:1704)
7   com.apple.WebCore             	0x0000000114e43c36 WebCore::Document::execCommand(WTF::String const&, bool, WTF::String const&) + 214 (Document.cpp:4666)
8   com.apple.WebCore             	0x000000011525a074 WebCore::jsDocumentPrototypeFunctionExecCommand(JSC::ExecState*) + 420 (JSCJSValue.h:499)
9   ???                           	0x000036b0fa001028 0 + 60133736452136
10  com.apple.JavaScriptCore      	0x00000001145b676f llint_entry + 22696
11  com.apple.JavaScriptCore      	0x00000001145b0ce4 vmEntryToJavaScript + 299
12  com.apple.JavaScriptCore      	0x00000001144712d9 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 169 (JITCode.cpp:82)
13  com.apple.JavaScriptCore      	0x0000000114457d12 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 450 (Interpreter.cpp:1008)
14  com.apple.JavaScriptCore      	0x00000001141238b7 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) + 71 (MarkedBlock.h:241)
15  com.apple.WebCore             	0x00000001152defa4 WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) + 996 (JSMainThreadExecState.h:56)
16  com.apple.WebCore             	0x0000000114f454db WebCore::EventTarget::fireEventListeners(WebCore::Event*, WebCore::EventTargetData*, WTF::Vector<WebCore::RegisteredEventListener, 1ul, WTF::CrashOnOverflow, 16ul>&) + 635 (InspectorInstrumentation.h:285)
17  com.apple.WebCore             	0x0000000114f451a0 WebCore::EventTarget::fireEventListeners(WebCore::Event*) + 224 (EventTarget.cpp:208)
18  com.apple.WebCore             	0x0000000114ed1bf4 WebCore::DOMWindow::dispatchEvent(WTF::PassRefPtr<WebCore::Event>, WTF::PassRefPtr<WebCore::EventTarget>) + 260 (DOMWindow.cpp:1900)
19  com.apple.WebCore             	0x0000000114ed730b WebCore::DOMWindow::dispatchLoadEvent() + 347 (StdLibExtras.h:366)
20  com.apple.WebCore             	0x0000000114e3a294 WebCore::Document::implicitClose() + 324 (Document.cpp:4077)
21  com.apple.WebCore             	0x0000000114fc7003 WebCore::FrameLoader::checkCompleted() + 275 (FrameLoader.cpp:839)
22  com.apple.WebCore             	0x0000000114fc595b WebCore::FrameLoader::finishedParsing() + 123 (FrameLoader.cpp:760)
23  com.apple.WebCore             	0x0000000114e45281 WebCore::Document::finishedParsing() + 417 (Frame.h:377)
24  com.apple.WebCore             	0x0000000115071e05 WebCore::HTMLDocumentParser::prepareToStopParsing() + 165 (RefCounted.h:99)
25  com.apple.WebCore             	0x0000000114e7569a WebCore::DocumentWriter::end() + 58 (StdLibExtras.h:366)
26  com.apple.WebCore             	0x0000000114e5d9ec WebCore::DocumentLoader::finishedLoading(double) + 268 (ResourceErrorBase.h:42)
27  com.apple.WebCore             	0x0000000114c8e179 WebCore::CachedResource::checkNotify() + 153 (CachedResourceClientWalker.h:51)
28  com.apple.WebCore             	0x0000000114c8a433 WebCore::CachedRawResource::finishLoading(WebCore::SharedBuffer*) + 227 (CachedRawResource.cpp:104)
29  com.apple.WebCore             	0x0000000115a05501 WebCore::SubresourceLoader::didFinishLoading(double) + 1153 (ResourceLoader.h:154)
30  com.apple.WebKit              	0x000000011354b98d WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&, IPC::MessageDecoder&) + 561 (HandleMessage.h:16)
31  com.apple.WebKit              	0x00000001133251f1 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >) + 127 (memory:2636)
32  com.apple.WebKit              	0x0000000113327b4a IPC::Connection::dispatchOneMessage() + 126 (memory:2656)
33  com.apple.JavaScriptCore      	0x0000000114769985 WTF::RunLoop::performWork() + 437 (functional:1742)
34  com.apple.JavaScriptCore      	0x0000000114769d32 WTF::RunLoop::performWork(void*) + 34 (RunLoopCF.cpp:39)
35  com.apple.CoreFoundation      	0x00007fff949e2c01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
36  com.apple.CoreFoundation      	0x00007fff949d4b1c __CFRunLoopDoSources0 + 556
37  com.apple.CoreFoundation      	0x00007fff949d403f __CFRunLoopRun + 927
38  com.apple.CoreFoundation      	0x00007fff949d3a38 CFRunLoopRunSpecific + 296
39  com.apple.HIToolbox           	0x00007fff88e673bd RunCurrentEventLoopInMode + 235
40  com.apple.HIToolbox           	0x00007fff88e67153 ReceiveNextEventCommon + 432
41  com.apple.HIToolbox           	0x00007fff88e66f93 _BlockUntilNextEventMatchingListInModeWithFilter + 71
42  com.apple.AppKit              	0x00007fff870b81e7 _DPSNextEvent + 1076
43  com.apple.AppKit              	0x00007fff8748490d -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
44  com.apple.AppKit              	0x00007fff870ae0b8 -[NSApplication run] + 682
45  com.apple.AppKit              	0x00007fff87030396 NSApplicationMain + 1176
46  libxpc.dylib                  	0x00007fff8c70ff70 _xpc_objc_main + 793
47  libxpc.dylib                  	0x00007fff8c7116bf xpc_main + 494
48  com.apple.WebKit.WebContent.Development	0x000000010ced9424 main + 409 (XPCServiceMain.Development.mm:187)
49  libdyld.dylib                 	0x00007fff93aa15ad start + 1
Comment 1 Radar WebKit Bug Importer 2015-09-17 14:41:14 PDT
<rdar://problem/22746657>
Comment 2 Jiewen Tan 2015-10-20 15:31:17 PDT
Created attachment 263622 [details]
Patch
Comment 3 WebKit Commit Bot 2015-10-26 15:04:41 PDT
Comment on attachment 263622 [details]
Patch

Clearing flags on attachment: 263622

Committed r191604: <http://trac.webkit.org/changeset/191604>
Comment 4 WebKit Commit Bot 2015-10-26 15:04:45 PDT
All reviewed patches have been landed.  Closing bug.