Bug 149295 - Null dereference loading Blink layout test editing/execCommand/insert-tab-to-html-element-crash.html
Summary: Null dereference loading Blink layout test editing/execCommand/insert-tab-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:42 PDT by Jon Honeycutt
Modified: 2015-10-16 19:16 PDT (History)
3 users (show)

See Also:


Attachments
crashing test (415 bytes, text/html)
2015-09-17 14:42 PDT, Jon Honeycutt
no flags Details
Patch (3.54 KB, patch)
2015-10-12 18:45 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:42:42 PDT
Created attachment 261431 [details]
crashing test

Null dereference loading Blink layout test editing/execCommand/insert-tab-to-html-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                 0000000100714000-0000000100716000 [    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-tab-to-html-element-crash.html

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

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebCore             	0x000000010899f6d6 WebCore::InsertTextCommand::insertTab(WebCore::Position const&) + 150 (Node.h:638)
1   com.apple.WebCore             	0x000000010899ed3c WebCore::InsertTextCommand::doApply() + 1196 (RefPtr.h:63)
2   com.apple.WebCore             	0x0000000108518630 WebCore::CompositeEditCommand::applyCommandToComposite(WTF::PassRefPtr<WebCore::CompositeEditCommand>, WebCore::VisibleSelection const&) + 80 (CompositeEditCommand.cpp:296)
3   com.apple.WebCore             	0x0000000109363c13 WebCore::TypingCommand::insertTextRunWithoutNewlines(WTF::String const&, bool) + 115 (StdLibExtras.h:366)
4   com.apple.WebCore             	0x0000000109364091 void WebCore::forEachLineInString<WebCore::TypingCommandLineOperation>(WTF::String const&, WebCore::TypingCommandLineOperation const&) + 257 (StdLibExtras.h:366)
5   com.apple.WebCore             	0x0000000109363656 WebCore::TypingCommand::doApply() + 214 (TypingCommand.cpp:286)
6   com.apple.WebCore             	0x0000000108518216 WebCore::CompositeEditCommand::apply() + 102 (ScopedEventQueue.h:71)
7   com.apple.WebCore             	0x0000000109325263 WebCore::TextInsertionBaseCommand::applyTextInsertionCommand(WebCore::Frame*, WTF::PassRefPtr<WebCore::TextInsertionBaseCommand>, WebCore::VisibleSelection const&, WebCore::VisibleSelection const&) + 67 (StdLibExtras.h:366)
8   com.apple.WebCore             	0x0000000109362bde WebCore::TypingCommand::insertText(WebCore::Document&, WTF::String const&, WebCore::VisibleSelection const&, unsigned int, WebCore::TypingCommand::TextCompositionType) + 686 (StdLibExtras.h:366)
9   com.apple.WebCore             	0x000000010874c29a WebCore::executeInsertText(WebCore::Frame&, WebCore::Event*, WebCore::EditorCommandSource, WTF::String const&) + 26 (EditorCommand.cpp:535)
10  com.apple.WebCore             	0x000000010874a876 WebCore::Editor::Command::execute(WTF::String const&, WebCore::Event*) const + 182 (EditorCommand.cpp:1704)
11  com.apple.WebCore             	0x0000000108683c36 WebCore::Document::execCommand(WTF::String const&, bool, WTF::String const&) + 214 (Document.cpp:4666)
12  com.apple.WebCore             	0x0000000108a9a074 WebCore::jsDocumentPrototypeFunctionExecCommand(JSC::ExecState*) + 420 (JSCJSValue.h:499)
13  ???                           	0x0000308fa8e01028 0 + 53393571713064
14  com.apple.JavaScriptCore      	0x0000000107df676f llint_entry + 22696
15  com.apple.JavaScriptCore      	0x0000000107df0ce4 vmEntryToJavaScript + 299
16  com.apple.JavaScriptCore      	0x0000000107cb12d9 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 169 (JITCode.cpp:82)
17  com.apple.JavaScriptCore      	0x0000000107c97d12 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 450 (Interpreter.cpp:1008)
18  com.apple.JavaScriptCore      	0x00000001079638b7 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) + 71 (MarkedBlock.h:241)
19  com.apple.WebCore             	0x0000000108b1efa4 WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) + 996 (JSMainThreadExecState.h:56)
20  com.apple.WebCore             	0x00000001087854db WebCore::EventTarget::fireEventListeners(WebCore::Event*, WebCore::EventTargetData*, WTF::Vector<WebCore::RegisteredEventListener, 1ul, WTF::CrashOnOverflow, 16ul>&) + 635 (InspectorInstrumentation.h:285)
21  com.apple.WebCore             	0x00000001087851a0 WebCore::EventTarget::fireEventListeners(WebCore::Event*) + 224 (EventTarget.cpp:208)
22  com.apple.WebCore             	0x0000000108711bf4 WebCore::DOMWindow::dispatchEvent(WTF::PassRefPtr<WebCore::Event>, WTF::PassRefPtr<WebCore::EventTarget>) + 260 (DOMWindow.cpp:1900)
23  com.apple.WebCore             	0x000000010871730b WebCore::DOMWindow::dispatchLoadEvent() + 347 (StdLibExtras.h:366)
24  com.apple.WebCore             	0x000000010867a294 WebCore::Document::implicitClose() + 324 (Document.cpp:4077)
25  com.apple.WebCore             	0x0000000108807003 WebCore::FrameLoader::checkCompleted() + 275 (FrameLoader.cpp:839)
26  com.apple.WebCore             	0x000000010880595b WebCore::FrameLoader::finishedParsing() + 123 (FrameLoader.cpp:760)
27  com.apple.WebCore             	0x0000000108685281 WebCore::Document::finishedParsing() + 417 (Frame.h:377)
28  com.apple.WebCore             	0x00000001088b1e05 WebCore::HTMLDocumentParser::prepareToStopParsing() + 165 (RefCounted.h:99)
29  com.apple.WebCore             	0x00000001086b569a WebCore::DocumentWriter::end() + 58 (StdLibExtras.h:366)
30  com.apple.WebCore             	0x000000010869d9ec WebCore::DocumentLoader::finishedLoading(double) + 268 (ResourceErrorBase.h:42)
31  com.apple.WebCore             	0x00000001084ce179 WebCore::CachedResource::checkNotify() + 153 (CachedResourceClientWalker.h:51)
32  com.apple.WebCore             	0x00000001084ca433 WebCore::CachedRawResource::finishLoading(WebCore::SharedBuffer*) + 227 (CachedRawResource.cpp:104)
33  com.apple.WebCore             	0x0000000109245501 WebCore::SubresourceLoader::didFinishLoading(double) + 1153 (ResourceLoader.h:154)
34  com.apple.WebKit              	0x0000000106d8b98d WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&, IPC::MessageDecoder&) + 561 (HandleMessage.h:16)
35  com.apple.WebKit              	0x0000000106b651f1 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >) + 127 (memory:2636)
36  com.apple.WebKit              	0x0000000106b67b4a IPC::Connection::dispatchOneMessage() + 126 (memory:2656)
37  com.apple.JavaScriptCore      	0x0000000107fa9985 WTF::RunLoop::performWork() + 437 (functional:1742)
38  com.apple.JavaScriptCore      	0x0000000107fa9d32 WTF::RunLoop::performWork(void*) + 34 (RunLoopCF.cpp:39)
39  com.apple.CoreFoundation      	0x00007fff949e2c01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
40  com.apple.CoreFoundation      	0x00007fff949d4b1c __CFRunLoopDoSources0 + 556
41  com.apple.CoreFoundation      	0x00007fff949d403f __CFRunLoopRun + 927
42  com.apple.CoreFoundation      	0x00007fff949d3a38 CFRunLoopRunSpecific + 296
43  com.apple.HIToolbox           	0x00007fff88e673bd RunCurrentEventLoopInMode + 235
44  com.apple.HIToolbox           	0x00007fff88e67153 ReceiveNextEventCommon + 432
45  com.apple.HIToolbox           	0x00007fff88e66f93 _BlockUntilNextEventMatchingListInModeWithFilter + 71
46  com.apple.AppKit              	0x00007fff870b81e7 _DPSNextEvent + 1076
47  com.apple.AppKit              	0x00007fff8748490d -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
48  com.apple.AppKit              	0x00007fff870ae0b8 -[NSApplication run] + 682
49  com.apple.AppKit              	0x00007fff87030396 NSApplicationMain + 1176
50  libxpc.dylib                  	0x00007fff8c70ff70 _xpc_objc_main + 793
51  libxpc.dylib                  	0x00007fff8c7116bf xpc_main + 494
52  com.apple.WebKit.WebContent.Development	0x0000000100715424 main + 409 (XPCServiceMain.Development.mm:187)
53  libdyld.dylib                 	0x00007fff93aa15ad start + 1
Comment 1 Radar WebKit Bug Importer 2015-09-17 14:43:05 PDT
<rdar://problem/22746706>
Comment 2 Jiewen Tan 2015-10-12 18:45:00 PDT
Created attachment 262957 [details]
Patch
Comment 3 WebKit Commit Bot 2015-10-16 19:15:57 PDT
Comment on attachment 262957 [details]
Patch

Clearing flags on attachment: 262957

Committed r191233: <http://trac.webkit.org/changeset/191233>
Comment 4 WebKit Commit Bot 2015-10-16 19:16:01 PDT
All reviewed patches have been landed.  Closing bug.