Created attachment 584297 [details]
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0a1) Gecko/20111224 Firefox/12.0a1
Build ID: 20111224031026
Steps to reproduce:
Open attachment file in Nightly build firefox. I'll reduce the repro-case after the Holidays.
I can confirm a crash if I load the testcase via local filesystem.
This seems to be the regression range:
Last good nightly: 2011-09-21
First bad nightly: 2011-09-22
The crash report is useless: bp-f0aa99af-c05c-4735-9e50-52ced2111225 except that it confirms EXCEPTION_NONCONTINUABLE_EXCEPTION
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0a1) Gecko/20110921 Firefox/9.0a1 ID:20110921030906
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0a1) Gecko/20110921 Firefox/9.0a1 ID:20110921013649
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0a1) Gecko/20110920 Firefox/9.0a1 ID:20110920121748
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0a1) Gecko/20110920 Firefox/9.0a1 ID:20110920140549
c237a8550070 Boris Zbarsky — Bug 444641 part 3. Propagate the loading principal to the image channel as needed. r=joe,dveditz
Reduced test-case is file with the following content:
I can't reproduce the crash in a trunk build on Mac. Is this Windows-only?
The crash report stack is obviously busted, sadly. :( But I can buy us crashing on a null-deref here.
Alice0775, do you happen to have a debug build by any chance? Accurate information on where this is actually crashing would be really useful!
Can't reproduce on Ubuntu 11.04 x64 either. Seems like windows only. Can someone clarify the noncontinuable exception for me? Never faced one before.
I don't think it's worth worrying about the exception type. Given the crash address, this is a null-deref; given the Windows-only thing and the testcase, it's somewhere in nsLocalFileWin. The question is where....
Created attachment 584340 [details]
$: also crashes on Firefox3.0-12.0
Those stacks are still showing crashes at points where there is nothing there to crash. :(
> int drive = TOUPPER(path.First()) - 'A' + 1;
Obviously |drive| will have a bogus value when the drive letter is invalid.
Created attachment 593302 [details] [diff] [review]
Indeed, running the test case in a debug build is much more effective:
Microsoft Visual C++ Debug Library
Debug Assertion Failed!
Expression: ("Invalid Drive", 0)
Sadly Gecko then hangs because it executes a posted runnable that tries to XHR to perform an addon check that tries to create the bad cert handler for the first time by loading it from the startup cache even though I used -purgecaches which deadlocks when the startup cache thread tries to access the CRT...
Actually what worries me is why we are hitting this code at all because file:///C:/ should be a canonical path...
At this point in code we're no longer working with file URLs but actual file paths.
nsPrincipal::CheckMayLoad calls fileURL->GetFile() to get the targetFile, and then calls Normalize on that target file.
Yes, I do understand that Normalize has been called, but C:\ is already canonical, so we shouldn't be trying to canonicalise it in this case.
The easiest example I could find of this is that launching composer using seamonkey -edit C:\ actually loads the listing for the current directory!
I understand your concern and I'd like to investigate that in the context of another bug since it isn't related to this crash. For example this crash can be reproduced by anyone using nsIFile and so this fix should be applied independently.
Please let me know if you disagree.
Comment on attachment 593302 [details] [diff] [review]
In that case I would prefer it if InitWithPath failed immediately.
Created attachment 594698 [details] [diff] [review]
Thanks for the review. Implemented review comments.
In case it gets an r+, this is passing try.