Bug 149315

Summary: Null dereference loading Blink layout test svg/custom/use-href-attr-removal-crash.html
Product: WebKit Reporter: Jon Honeycutt <jhoneycutt>
Component: SVGAssignee: Dean Jackson <dino>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, webkit-bug-importer, zimmermann
Priority: P2 Keywords: BlinkMergeCandidate, HasReduction, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
crashing test
none
crashing test 2
none
Patch
none
Patch
none
Patch thorton: review+

Description Jon Honeycutt 2015-09-17 16:36:10 PDT
Created attachment 261452 [details]
crashing test

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

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

VM Regions Near 0x58:
--> 
    __TEXT                 0000000104aa5000-0000000104aa7000 [    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/svg/custom/use-href-attr-removal-crash.html

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

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebCore             	0x000000010cb15d7d WebCore::Element::getAttribute(WebCore::QualifiedName const&) const + 13 (RefPtr.h:61)
1   com.apple.WebCore             	0x000000010d6c7dbd WebCore::SVGUseElement::transferSizeAttributesToTargetClone(WebCore::SVGElement&) const + 365 (RefPtr.h:44)
2   com.apple.WebCore             	0x000000010d6c81eb WebCore::SVGUseElement::svgAttributeChanged(WebCore::QualifiedName const&) + 187 (Node.h:448)
3   com.apple.WebCore             	0x000000010cb1cc0e WebCore::Element::didAddAttribute(WebCore::QualifiedName const&, WTF::AtomicString const&) + 46 (InspectorInstrumentation.h:285)
4   com.apple.WebCore             	0x000000010cb1cbcb WebCore::Element::addAttributeInternal(WebCore::QualifiedName const&, WTF::AtomicString const&, WebCore::Element::SynchronizationOfLazyAttribute) + 363 (Element.cpp:2034)
5   com.apple.WebCore             	0x000000010cb19096 WebCore::Element::setAttribute(WTF::AtomicString const&, WTF::AtomicString const&, int&) + 678 (StdLibExtras.h:366)
6   com.apple.WebCore             	0x000000010ceccda8 WebCore::jsElementPrototypeFunctionSetAttribute(JSC::ExecState*) + 504 (StdLibExtras.h:366)
7   ???                           	0x0000263c79401028 0 + 42041174134824
8   com.apple.JavaScriptCore      	0x000000010c1b676f llint_entry + 22696
9   com.apple.JavaScriptCore      	0x000000010c1b0ce4 vmEntryToJavaScript + 299
10  com.apple.JavaScriptCore      	0x000000010c0712d9 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 169 (JITCode.cpp:82)
11  com.apple.JavaScriptCore      	0x000000010c057d12 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 450 (Interpreter.cpp:1008)
12  com.apple.JavaScriptCore      	0x000000010bd238b7 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) + 71 (MarkedBlock.h:241)
13  com.apple.WebCore             	0x000000010cedefa4 WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) + 996 (JSMainThreadExecState.h:56)
14  com.apple.WebCore             	0x000000010cb454db WebCore::EventTarget::fireEventListeners(WebCore::Event*, WebCore::EventTargetData*, WTF::Vector<WebCore::RegisteredEventListener, 1ul, WTF::CrashOnOverflow, 16ul>&) + 635 (InspectorInstrumentation.h:285)
15  com.apple.WebCore             	0x000000010cb451a0 WebCore::EventTarget::fireEventListeners(WebCore::Event*) + 224 (EventTarget.cpp:208)
16  com.apple.WebCore             	0x000000010cad1bf4 WebCore::DOMWindow::dispatchEvent(WTF::PassRefPtr<WebCore::Event>, WTF::PassRefPtr<WebCore::EventTarget>) + 260 (DOMWindow.cpp:1900)
17  com.apple.WebCore             	0x000000010cad730b WebCore::DOMWindow::dispatchLoadEvent() + 347 (StdLibExtras.h:366)
18  com.apple.WebCore             	0x000000010ca3a294 WebCore::Document::implicitClose() + 324 (Document.cpp:4077)
19  com.apple.WebCore             	0x000000010cbc7003 WebCore::FrameLoader::checkCompleted() + 275 (FrameLoader.cpp:839)
20  com.apple.WebCore             	0x000000010cbc595b WebCore::FrameLoader::finishedParsing() + 123 (FrameLoader.cpp:760)
21  com.apple.WebCore             	0x000000010ca45281 WebCore::Document::finishedParsing() + 417 (Frame.h:377)
22  com.apple.WebCore             	0x000000010cc71e05 WebCore::HTMLDocumentParser::prepareToStopParsing() + 165 (RefCounted.h:99)
23  com.apple.WebCore             	0x000000010ca7569a WebCore::DocumentWriter::end() + 58 (StdLibExtras.h:366)
24  com.apple.WebCore             	0x000000010ca5d9ec WebCore::DocumentLoader::finishedLoading(double) + 268 (ResourceErrorBase.h:42)
25  com.apple.WebCore             	0x000000010c88e179 WebCore::CachedResource::checkNotify() + 153 (CachedResourceClientWalker.h:51)
26  com.apple.WebCore             	0x000000010c88a433 WebCore::CachedRawResource::finishLoading(WebCore::SharedBuffer*) + 227 (CachedRawResource.cpp:104)
27  com.apple.WebCore             	0x000000010d605501 WebCore::SubresourceLoader::didFinishLoading(double) + 1153 (ResourceLoader.h:154)
28  com.apple.WebKit              	0x000000010b14b98d WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&, IPC::MessageDecoder&) + 561 (HandleMessage.h:16)
29  com.apple.WebKit              	0x000000010af251f1 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >) + 127 (memory:2636)
30  com.apple.WebKit              	0x000000010af27b4a IPC::Connection::dispatchOneMessage() + 126 (memory:2656)
31  com.apple.JavaScriptCore      	0x000000010c369985 WTF::RunLoop::performWork() + 437 (functional:1742)
32  com.apple.JavaScriptCore      	0x000000010c369d32 WTF::RunLoop::performWork(void*) + 34 (RunLoopCF.cpp:39)
33  com.apple.CoreFoundation      	0x00007fff949e2c01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
34  com.apple.CoreFoundation      	0x00007fff949d4b1c __CFRunLoopDoSources0 + 556
35  com.apple.CoreFoundation      	0x00007fff949d403f __CFRunLoopRun + 927
36  com.apple.CoreFoundation      	0x00007fff949d3a38 CFRunLoopRunSpecific + 296
37  com.apple.HIToolbox           	0x00007fff88e673bd RunCurrentEventLoopInMode + 235
38  com.apple.HIToolbox           	0x00007fff88e67153 ReceiveNextEventCommon + 432
39  com.apple.HIToolbox           	0x00007fff88e66f93 _BlockUntilNextEventMatchingListInModeWithFilter + 71
40  com.apple.AppKit              	0x00007fff870b81e7 _DPSNextEvent + 1076
41  com.apple.AppKit              	0x00007fff8748490d -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
42  com.apple.AppKit              	0x00007fff870ae0b8 -[NSApplication run] + 682
43  com.apple.AppKit              	0x00007fff87030396 NSApplicationMain + 1176
44  libxpc.dylib                  	0x00007fff8c70ff70 _xpc_objc_main + 793
45  libxpc.dylib                  	0x00007fff8c7116bf xpc_main + 494
46  com.apple.WebKit.WebContent.Development	0x0000000104aa6424 main + 409 (XPCServiceMain.Development.mm:187)
47  libdyld.dylib                 	0x00007fff93aa15ad start + 1
Comment 1 Radar WebKit Bug Importer 2015-09-17 16:36:33 PDT
<rdar://problem/22749358>
Comment 2 Jon Honeycutt 2015-09-17 16:41:17 PDT
Created attachment 261453 [details]
crashing test 2
Comment 3 Dean Jackson 2015-09-18 18:39:47 PDT
Created attachment 261555 [details]
Patch
Comment 4 Dean Jackson 2015-09-18 18:52:36 PDT
Created attachment 261557 [details]
Patch
Comment 5 Dean Jackson 2015-09-18 19:00:34 PDT
Created attachment 261560 [details]
Patch
Comment 6 Dean Jackson 2015-09-19 02:57:03 PDT
Committed r190012: <http://trac.webkit.org/changeset/190012>