Closed Bug 102921 Opened 24 years ago Closed 24 years ago

Mozilla crashes when Cache in profile dir points to nonexistent directory

Categories

(Core :: Networking: Cache, defect, P2)

x86
Linux
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.9

People

(Reporter: hramrach, Assigned: gordon)

Details

(Keywords: crash, Whiteboard: patch)

Attachments

(1 file)

To reproduce: 1)Make a Mozilla profile 2)Terminate Mozilla 3)Remove Cache dir from your profile 4)Make Cache a symlink pointing to a nonexistenet location 5)Re-run Mozilla Result: crash Expected: error report, cache disabling?
Severity: normal → critical
Keywords: crash
I think this goes in the category of "Don't Do That". :)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Seems like we should at least make this not crash. Targeting for 0.9.6.
Target Milestone: --- → mozilla0.9.6
Moving to 0.9.8, when necko will be focusing on stability.
Target Milestone: mozilla0.9.6 → mozilla0.9.8
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Priority: -- → P2
Keywords: nsbeta1+
We call nsIFile::Exists() to determine if we need to create the Cache directory. In the case of a symbolic link to a non-existant ojbect, Exists() calls access() which returns false. However, the subsequent Create() fails because the existence of the link prevents the creation of a new directory. The crash occured because nsDiskCacheDevice::Init() presumed mCacheDirectory was valid. I've added a line to return an error if this isn't true. The result is to disable the disk cache if it believes it needs to create a new cache directory, but can't for some reason.
Whiteboard: patch
Comment on attachment 70240 [details] [diff] [review] disable disk cache if we can't create Cache directory. sr=darin
Attachment #70240 - Flags: superreview+
Patch checked in. Marking FIXED.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
verified: Linux rh6 2002022708
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: