Closed
Bug 458158
Opened 16 years ago
Closed 16 years ago
Crash [@ nsJAR::Open] when passing null argument to open method of zip-reader
Categories
(Core :: Networking: JAR, defect)
Core
Networking: JAR
Tracking
()
VERIFIED
FIXED
mozilla1.9.2a1
People
(Reporter: martijn.martijn, Assigned: martijn.martijn)
References
Details
(4 keywords)
Crash Data
Attachments
(2 files, 2 obsolete files)
412 bytes,
text/html
|
Details | |
1.25 KB,
patch
|
martijn.martijn
:
review+
martijn.martijn
:
superreview+
benjamin
:
approval1.9.1+
|
Details | Diff | Splinter Review |
See testcase, which crashes when passing null to the zip-reader when using the open method. http://crash-stats.mozilla.com/report/pending/01ec3442-9031-11dd-9367-001cc45a2ce4
Assignee | ||
Comment 1•16 years ago
|
||
Btw, this was filed as a spin-off from bug 458108. 0 xul.dll nsJAR::Open modules/libjar/nsJAR.cpp:174 1 xul.dll NS_InvokeByIndex_P xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp:101 2 xul.dll XPCWrappedNative::CallMethod js/src/xpconnect/src/xpcwrappednative.cpp:2405
Summary: Crash when passing null argument to open method of zip-reader → Crash [@ nsJAR::Open] when passing null argument to open method of zip-reader
I get a blank page if I navigate to that testcase. Is something missing?
Assignee | ||
Comment 3•16 years ago
|
||
The testcase uses enhanced privileges, you need to download it to your computer, so the enhanced privileges prompt comes up.
Assignee | ||
Comment 4•16 years ago
|
||
Attachment #341425 -
Flags: superreview?(cbiesinger)
Attachment #341425 -
Flags: review?(cbiesinger)
Comment 5•16 years ago
|
||
Comment on attachment 341425 [details] [diff] [review] patch please also add a unit test
Attachment #341425 -
Flags: superreview?(cbiesinger)
Attachment #341425 -
Flags: superreview+
Attachment #341425 -
Flags: review?(cbiesinger)
Attachment #341425 -
Flags: review+
Assignee | ||
Updated•16 years ago
|
Assignee: nobody → martijn.martijn
Comment 6•16 years ago
|
||
checkin needed? this crashing my browser every time i download a file. http://crash-stats.mozilla.com/report/index/176b39e8-9017-11dd-80cf-001a4bd43ef6
Assignee | ||
Comment 7•16 years ago
|
||
Well, I need to add a unit test first.
Comment 9•16 years ago
|
||
Using 3.1b1, I'm seeing the same behavior as comment 6: a crash at the end of every single file download. For the moment, I've reverted to 3.0.
Comment 10•16 years ago
|
||
I'm experiencing the same issue: http://crash-stats.mozilla.com/report/index/04be8a54-96b4-11dd-99b7-001cc45a2ce4
Updated•16 years ago
|
Flags: blocking1.9.1?
Comment 11•16 years ago
|
||
I'm still seeing this issue on the latest Mac nightly build. Any chance of getting fixed soon? Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20081202 Shiretoko/3.1b3pre
Comment 12•16 years ago
|
||
sooner if you write a unit test we don't care about crashes anymore, only unit tests.
Comment 13•16 years ago
|
||
C'mon, that's not accurate. The reality is that writing a test for this is an exercise in triviality, and it's not unreasonable to say that exercise must be completed here. It's not like this crash is one you're going to hit in normal use -- passing null is already a bug, so things aren't necessarily going to work in the calling code anyway, even if crashing is a bit severe for a reaction to an API violation. But really, if you'd like to see this fixed, it should be pretty easy to create a test patterned off of <http://mxr.mozilla.org/mozilla-central/source/modules/libjar/test/unit/test_bug333423.js> that could be used here.
Assignee | ||
Comment 14•16 years ago
|
||
Sorry for not providing a unit test, but I first need to learn how that stuff works. I'll try to come up with a unit test within the next week or so.
Comment 15•16 years ago
|
||
(In reply to comment #9) > Using 3.1b1, I'm seeing the same behavior as comment 6: a crash at the end of > every single file download. For the moment, I've reverted to 3.0. I'm now seeing this with trunk builds. I think this means that there's a broken caller out there, and this patch just wallpapers the problem. Granted, it might be the right color wallpaper...
Comment 16•16 years ago
|
||
Aha, turns out it was the Prism extension that was crashing me. I disabled extension compat checking yesterday after updating to latest trunk. Removing that extension stops this crash on file downloads. -fullmetaljacket-, dmose, if you have that extension you might want to disable it.
Comment 17•16 years ago
|
||
Confirm that it's Prism (0.2.1) causing the crash as well.
Comment 18•16 years ago
|
||
This bug was filed in response to bug 458108. I'll add a dependency.
Comment 19•16 years ago
|
||
Could someone also please confirm bug 458108. It has long been left as unconfirmed. Thanks
Comment 20•16 years ago
|
||
(In reply to comment #16) yes it was prism (bug 458108) and older version of weave used to crash ff, if i remember it right, but fixed by update to weave 0.2.7.
Comment 21•16 years ago
|
||
Anyone know why this hasn't landed yet? I don't think this is a blocker, but we should take it once it bakes on trunk.
Flags: wanted1.9.1+
Flags: blocking1.9.1?
Flags: blocking1.9.1-
Comment 22•16 years ago
|
||
It needs a test, and it's easy to write one. It's not like this is tricky functionality that's difficult to test due to race conditions or codebase inflexibility, it's just that no one's gone through the effort to write it yet.
Assignee | ||
Comment 23•16 years ago
|
||
Sorry for taking so long to write a test, I'll to come up with something this week, hopefully.
Comment 24•16 years ago
|
||
At this rate, I don't think this is going to make 3.1. :-(
Assignee | ||
Comment 25•16 years ago
|
||
Bug 458108 is fixed, so this shouldn't be a real issue anymore.
Comment 26•16 years ago
|
||
Martijn, if you need help writing this, ping me on IRC any time tomorrow -- it's less than five minutes tops, I think.
Assignee | ||
Comment 27•16 years ago
|
||
Sorry for the delay! Ok, now I've added the xpcshell unit test. Without the patch, the xpcshell test causes a crash in the xpcshell.exe, when running make check in "C:\mozilla-build-1.3\src\_firefox\modules\libjar". After I applied the patch the xpchell test passes.
Attachment #341425 -
Attachment is obsolete: true
Attachment #358013 -
Flags: ui-review?(jwalden+bmo)
Attachment #358013 -
Flags: superreview+
Attachment #358013 -
Flags: review+
Updated•16 years ago
|
Attachment #358013 -
Flags: ui-review?(jwalden+bmo) → ui-review+
Comment 28•16 years ago
|
||
Comment on attachment 358013 [details] [diff] [review] patch2 >diff --git a/modules/libjar/test/unit/test_bug458158.js b/modules/libjar/test/unit/test_bug458158.js >+ } catch (e if ((e instanceof Components.interfaces.nsIException) && >+ (e.result == Components.results.NS_ERROR_NULL_POINTER))) { >+ // do nothing, this test passes >+ } Please remove the redundant parentheses on the two conditions.
Assignee | ||
Comment 29•16 years ago
|
||
Btw, I copied that code from another unit test, which still has these redundant parentheses.
Attachment #358013 -
Attachment is obsolete: true
Attachment #358061 -
Flags: superreview+
Attachment #358061 -
Flags: review+
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•16 years ago
|
Attachment #358061 -
Attachment is patch: true
Attachment #358061 -
Attachment mime type: application/octet-stream → text/plain
Assignee | ||
Comment 30•16 years ago
|
||
Checked in: $ hg tip changeset: 24060:b398934d235f tag: tip user: Martijn Wargers <mwargers@mozilla.com> date: Thu Jan 22 16:12:00 2009 +0100 summary: Bug 458158 - Crash [@ nsJAR::Open] when passing null argument to op en method of zip-reader, r+sr=cbiesinger and r=jwalden+bmo
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Assignee | ||
Updated•16 years ago
|
Attachment #358061 -
Flags: approval1.9.1?
Updated•15 years ago
|
Keywords: checkin-needed
Comment 31•15 years ago
|
||
Thanks for writing the test!
Comment 32•15 years ago
|
||
The current #8 crash on the 1.9.1 branch (Firefox 3.1b3pre) crashes in this stack. We should really try to get this in for beta 3 to see if it's fixed.
Updated•15 years ago
|
Attachment #358061 -
Flags: approval1.9.1? → approval1.9.1+
Comment 33•15 years ago
|
||
Looks like it only has to be checked into 1.9.1 branch? Or do I miss something?
Keywords: topcrash
OS: Windows XP → All
Pushed changeset da28c92f6c2c to mozilla-1.9.1.
Keywords: fixed1.9.1
Updated•15 years ago
|
Target Milestone: --- → mozilla1.9.2a1
Comment 35•15 years ago
|
||
Verified fixed on the 1.9.1 branch using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b4pre) Gecko/20090414 Shiretoko/3.5b4pre and Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090414 Shiretoko/3.5b4pre.
Keywords: fixed1.9.1 → verified1.9.1
Comment 36•15 years ago
|
||
Verified fixed on trunk with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090423 Minefield/3.6a1pre ID:20090423040020
Status: RESOLVED → VERIFIED
Hardware: x86 → All
Updated•13 years ago
|
Crash Signature: [@ nsJAR::Open]
You need to log in
before you can comment on or make changes to this bug.
Description
•