CFNetwork failed connection nil dereference

Originator:rarichter
Number:rdar://10576868 Date Originated:12/13/2011
Status:Open Resolved:
Product:Mac OS X Product Version:10.7
Classification:serious bug Reproducible:yes
 
Summary:
I'm not sure of the exact cause of this particular crash but it currently accounts for 63% of the crash logs we're receiving for Growl 1.3.2.  There appears to be an error state that is expecting an error value but instead is failing to nil check it prior to calling CFErrorGetDomain() on it in the URLConnectionClient::_clientDidFailWithError() member function.

Steps to Reproduce:
unknown at this time, we've been able to get it to happen sporadically but no rhyme or reason to the trigger.

Comments

I have distilled it down into a sample project that exhibits the behavior. Under [redacted] it no longer crashes at CFErrorGetDomain(), unfortunately it still does crash, instead at CFErrorGetCode(). URLProtocol:didFailWithError: should entirely be throwing an exception if you pass nil for the error. Passing a reference to a CF function without nil checking it is just bad.

http://dl.dropbox.com/u/8495004/radr/10576868-NSURLProtocolTest.zip

i have finally found a way to reliably reproduce this crash. will report my results of testing this on [redacted] tomorrow.

still working on a STR that we can use to confirm against [redacted]


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!