Closed Bug 344804 Opened 19 years ago Closed 19 years ago

Iterating over window.Packages crashes both Firefox and Java, [@ strlen] called by js_ExpandErrorArguments

Categories

(Core :: JavaScript Engine, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla1.8.1beta2

People

(Reporter: jruderman, Assigned: mrbkap)

References

()

Details

(Keywords: crash, testcase, verified1.8.1)

Crash Data

Attachments

(3 files)

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20060713 Minefield/3.0a1 Loading the testcase causes both Firefox and Java to crash. I don't know if that means both are buggy, or what. (I get a Firefox crash reporter dialog with JavaScript stuff on the stack, but if I look in Console.app I see that Java has also crashed.) I discovered this while trying to use the testcase in bug 344759.
Attached file testcase
Summary: Iterating over window.Packages crashes both Firefox and Java → Iterating over window.Packages crashes both Firefox and Java, [@ strlen] called by js_ExpandErrorArguments
Product: Firefox → Core
QA Contact: tabbed.browser → tabbed-browser
Assignee: nobody → general
Component: Tabbed Browser → JavaScript Engine
QA Contact: tabbed-browser → general
this is a regression from the patch in bug 326466. js_ValueToPrintableSource is allowed to "return" null (e.g. js_ValueToSource does) and http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/js/src/jsfun.c&rev=3.159&mark=2259#2228 doesn't check that.
Severity: normal → critical
Depends on: geniter
Yeah, this is probably the crash I saw, which I mentioned in bug 344759, comment 3.
Blocks: geniter
No longer depends on: geniter
Blocks: 344950
Attached patch Silly fixSplinter Review
Sadly, this lets the error that js_ValueToSource throws trump the 'invalid iterator' message. I'm not sure if we really want that, but what value would we use otherwise?
Assignee: general → mrbkap
Status: NEW → ASSIGNED
Attachment #229676 - Flags: review?(brendan)
OS: Mac OS X 10.4 → All
Priority: -- → P2
Hardware: Macintosh → All
Target Milestone: --- → mozilla1.8.1beta2
Comment on attachment 229676 [details] [diff] [review] Silly fix We do the same all over. An error on the way to reporting another error trumps. Usually it's OOM, and you've paged to death. /be
Attachment #229676 - Flags: review?(brendan) → review+
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Checking in regress-344804.js; /cvsroot/mozilla/js/tests/js1_5/Regress/regress-344804.js,v <-- regress-344804.js initial revision: 1.1
Flags: in-testsuite+
Comment on attachment 229676 [details] [diff] [review] Silly fix This missed the js1.7 landing somehow, needs to get on the 1.8 branch. /be
Attachment #229676 - Flags: approval1.8.1?
Attachment #229676 - Flags: approval1.8.1? → approval1.8.1+
Fixed on the 1.8 branch.
Keywords: fixed1.8.1
verified fixed 1.8.1, 1.9 windows/mac(ppc|tel)/linux 20060728
Status: RESOLVED → VERIFIED
See also bug 349964, "Iterating over window.Packages halts JavaScript execution, even in 'try' block".
Crash Signature: [@ strlen]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: