Closed Bug 453747 Opened 16 years ago Closed 16 years ago

TM: "Assertion failure: JSVAL_IS_VOID(boxed) || JSVAL_IS_BOOLEAN(boxed)" (typeof, dense array holes?)

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: mrbkap)

References

Details

(Keywords: assertion, testcase)

Attachments

(1 file)

./js -j (function(){ var a = []; var s = 10; for (var i = 0; i < s; ++i) a[i] = 1; a[4*s-1] = 2; for (var i = s+1; i < s+4; ++i) typeof a[i]; })(); Assertion failure: JSVAL_IS_VOID(boxed) || JSVAL_IS_BOOLEAN(boxed), at jsbuiltins.cpp:621 This bug exists on mozilla-central and tracemonkey branch. Based on the sensitivity to the line "a[4*s-1]", I'm guessing the array has to be "dense" for the assertion to fire.
Attached patch Proposed fixSplinter Review
This seems to fix this.
Assignee: general → mrbkap
Status: NEW → ASSIGNED
Attachment #336976 - Flags: review?(gal)
Comment on attachment 336976 [details] [diff] [review] Proposed fix Looks good. Any chance for a test case for this?
Attachment #336976 - Flags: review?(gal) → review+
I am happy with jesse's weird fuzzer code in trace-tests.js. Anything is fine. Doesn't have to be pretty.
Oops, I meant to do that. I've added this (slightly) reduced testcase to trace-test.js: +function testTypeofHole() { + var a = new Array(6); + a[5] = 3; + for (var i = 0; i < 6; ++i) + a[i] = typeof a[i]; + return a.toString(); +} +testTypeofHole.expected = "undefined,undefined,undefined,undefined,undefined,number" +test(testTypeofHole); +
Landed as http://hg.mozilla.org/tracemonkey/rev/1a8d24f2c2aa I think we're supposed to hold off on marking bugs as fixed until they hit mozilla-central, so I'll wait.
This should be landed and fixed.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-453747.js,v <-- regress-453747.js initial revision: 1.1 m-c: changeset: 19332:f974d8987dab the test in comment 4 is already in js1_8_1/trace/trace-test.js
Flags: in-testsuite+
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: