The crash occurs when trying to copy a CFURLResponseRef in WKURLResponseCopyCFURLResponse that is null underneath WebCore::MainResourceLoader::handleEmptyLoad. Since the load is empty, it is reasonable for the CFURLResponseRef to be null, and we should not try to copy a null CFURLResponseRef. <rdar://problem/9102016>
Created attachment 85077 [details] Patch
Created attachment 85085 [details] Patch with a test
Comment on attachment 85085 [details] Patch with a test Committed in r80586 http://trac.webkit.org/changeset/80586
Comment on attachment 85085 [details] Patch with a test View in context: https://bugs.webkit.org/attachment.cgi?id=85085&action=review > Tools/TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp:38 > + WKRetainPtr<WKURLResponseRef> nullWKResponse = WKURLResponseCreateWithCFURLResponse(0); > + RetainPtr<CFURLResponseRef> nullCFResponse = WKURLResponseCopyCFURLResponse(kCFAllocatorDefault, nullWKResponse.get()); Both of these are being leaked.
(In reply to comment #4) > (From update of attachment 85085 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=85085&action=review > > > Tools/TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp:38 > > + WKRetainPtr<WKURLResponseRef> nullWKResponse = WKURLResponseCreateWithCFURLResponse(0); > > + RetainPtr<CFURLResponseRef> nullCFResponse = WKURLResponseCopyCFURLResponse(kCFAllocatorDefault, nullWKResponse.get()); > > Both of these are being leaked. Fixed in r80599 http://trac.webkit.org/changeset/80599