Bug 149290 - Null dereference loading Blink layout test editing/execCommand/indent-inline-box-crash.html
Summary: Null dereference loading Blink layout test editing/execCommand/indent-inline-...
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:32 PDT by Jon Honeycutt
Modified: 2015-10-26 13:17 PDT (History)
4 users (show)

See Also:


Attachments
crashing test (415 bytes, text/html)
2015-09-17 14:32 PDT, Jon Honeycutt
no flags Details
Patch (3.62 KB, patch)
2015-10-20 18:30 PDT, Jiewen Tan
no flags Details | Formatted Diff | Diff
Patch (3.74 KB, patch)
2015-10-21 18:19 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:32:35 PDT
Created attachment 261426 [details]
crashing test

Null dereference loading Blink layout test editing/execCommand/indent-inline-box-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                 0000000101586000-0000000101588000 [    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/indent-inline-box-crash.html

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

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebCore             	0x00000001097dcf8a WebCore::IndentOutdentCommand::tryIndentingAsListItem(WebCore::Position const&, WebCore::Position const&) + 90 (Node.h:638)
1   com.apple.WebCore             	0x00000001097df81c WebCore::IndentOutdentCommand::formatRange(WebCore::Position const&, WebCore::Position const&, WebCore::Position const&, WTF::RefPtr<WebCore::Element>&) + 28 (IndentOutdentCommand.cpp:234)
2   com.apple.WebCore             	0x00000001092c3605 WebCore::ApplyBlockElementCommand::formatSelection(WebCore::VisiblePosition const&, WebCore::VisiblePosition const&) + 4677 (ApplyBlockElementCommand.cpp:145)
3   com.apple.WebCore             	0x00000001092c204d WebCore::ApplyBlockElementCommand::doApply() + 1037 (Ref.h:123)
4   com.apple.WebCore             	0x000000010937a216 WebCore::CompositeEditCommand::apply() + 102 (ScopedEventQueue.h:71)
5   com.apple.WebCore             	0x00000001095adc4b WebCore::executeIndent(WebCore::Frame&, WebCore::Event*, WebCore::EditorCommandSource, WTF::String const&) + 59 (StdLibExtras.h:366)
6   com.apple.WebCore             	0x00000001095ac876 WebCore::Editor::Command::execute(WTF::String const&, WebCore::Event*) const + 182 (EditorCommand.cpp:1704)
7   com.apple.WebCore             	0x00000001094e5c36 WebCore::Document::execCommand(WTF::String const&, bool, WTF::String const&) + 214 (Document.cpp:4666)
8   com.apple.WebCore             	0x00000001098fc074 WebCore::jsDocumentPrototypeFunctionExecCommand(JSC::ExecState*) + 420 (JSCJSValue.h:499)
9   ???                           	0x0000331b98801028 0 + 56193615663144
10  com.apple.JavaScriptCore      	0x0000000108c5876f llint_entry + 22696
11  com.apple.JavaScriptCore      	0x0000000108c52ce4 vmEntryToJavaScript + 299
12  com.apple.JavaScriptCore      	0x0000000108b132d9 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 169 (JITCode.cpp:82)
13  com.apple.JavaScriptCore      	0x0000000108af9d12 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      	0x00000001087c58b7 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             	0x0000000109980fa4 WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) + 996 (JSMainThreadExecState.h:56)
16  com.apple.WebCore             	0x00000001095e74db WebCore::EventTarget::fireEventListeners(WebCore::Event*, WebCore::EventTargetData*, WTF::Vector<WebCore::RegisteredEventListener, 1ul, WTF::CrashOnOverflow, 16ul>&) + 635 (InspectorInstrumentation.h:285)
17  com.apple.WebCore             	0x00000001095e71a0 WebCore::EventTarget::fireEventListeners(WebCore::Event*) + 224 (EventTarget.cpp:208)
18  com.apple.WebCore             	0x0000000109573bf4 WebCore::DOMWindow::dispatchEvent(WTF::PassRefPtr<WebCore::Event>, WTF::PassRefPtr<WebCore::EventTarget>) + 260 (DOMWindow.cpp:1900)
19  com.apple.WebCore             	0x000000010957930b WebCore::DOMWindow::dispatchLoadEvent() + 347 (StdLibExtras.h:366)
20  com.apple.WebCore             	0x00000001094dc294 WebCore::Document::implicitClose() + 324 (Document.cpp:4077)
21  com.apple.WebCore             	0x0000000109669003 WebCore::FrameLoader::checkCompleted() + 275 (FrameLoader.cpp:839)
22  com.apple.WebCore             	0x000000010966795b WebCore::FrameLoader::finishedParsing() + 123 (FrameLoader.cpp:760)
23  com.apple.WebCore             	0x00000001094e7281 WebCore::Document::finishedParsing() + 417 (Frame.h:377)
24  com.apple.WebCore             	0x0000000109713e05 WebCore::HTMLDocumentParser::prepareToStopParsing() + 165 (RefCounted.h:99)
25  com.apple.WebCore             	0x000000010951769a WebCore::DocumentWriter::end() + 58 (StdLibExtras.h:366)
26  com.apple.WebCore             	0x00000001094ff9ec WebCore::DocumentLoader::finishedLoading(double) + 268 (ResourceErrorBase.h:42)
27  com.apple.WebCore             	0x0000000109330179 WebCore::CachedResource::checkNotify() + 153 (CachedResourceClientWalker.h:51)
28  com.apple.WebCore             	0x000000010932c433 WebCore::CachedRawResource::finishLoading(WebCore::SharedBuffer*) + 227 (CachedRawResource.cpp:104)
29  com.apple.WebCore             	0x000000010a0a7501 WebCore::SubresourceLoader::didFinishLoading(double) + 1153 (ResourceLoader.h:154)
30  com.apple.WebKit              	0x0000000107bed98d WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&, IPC::MessageDecoder&) + 561 (HandleMessage.h:16)
31  com.apple.WebKit              	0x00000001079c71f1 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >) + 127 (memory:2636)
32  com.apple.WebKit              	0x00000001079c9b4a IPC::Connection::dispatchOneMessage() + 126 (memory:2656)
33  com.apple.JavaScriptCore      	0x0000000108e0b985 WTF::RunLoop::performWork() + 437 (functional:1742)
34  com.apple.JavaScriptCore      	0x0000000108e0bd32 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	0x0000000101587424 main + 409 (XPCServiceMain.Development.mm:187)
49  libdyld.dylib                 	0x00007fff93aa15ad start + 1
Comment 1 Radar WebKit Bug Importer 2015-09-17 14:32:53 PDT
<rdar://problem/22746435>
Comment 2 Jiewen Tan 2015-10-20 18:30:33 PDT
Created attachment 263648 [details]
Patch
Comment 3 Alex Christensen 2015-10-21 09:53:48 PDT
Comment on attachment 263648 [details]
Patch

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

> Source/WebCore/editing/IndentOutdentCommand.cpp:68
>      // FIXME: we need to deal with the case where there is no li (malformed HTML)

Shouldn't this FIXME be removed now that it's fixed?
Comment 4 Jiewen Tan 2015-10-21 18:19:20 PDT
Created attachment 263777 [details]
Patch
Comment 5 WebKit Commit Bot 2015-10-26 13:17:39 PDT
Comment on attachment 263777 [details]
Patch

Clearing flags on attachment: 263777

Committed r191597: <http://trac.webkit.org/changeset/191597>
Comment 6 WebKit Commit Bot 2015-10-26 13:17:42 PDT
All reviewed patches have been landed.  Closing bug.