Closed Bug 619970 Opened 15 years ago Closed 15 years ago

Assertion failure: data.s.payload.why == why, at jsvalue.h:527

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: decoder, Assigned: luke)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(2 files)

The code (might not be minimal) function test_array_toString_sub_1() { Object.defineProperty(arguments, 1, { value: 1 }); arguments.join = [].join; assertEq([].toString.call(arguments), "1"); } test_array_toString_sub_1(1, 2); triggers the following assertion (tested on tracemonkey trunk): Assertion failure: data.s.payload.why == why, at jsvalue.h:527
Assignee: general → evilpies
I made some small mistake in my GetElement addition for arguments. I assumed array holes, would be represented as JS_ARRAY_HOLE, but in fact JS_ARGS_HOLE, is the right thing. This patch should be safe to land, because it's only affects debug mode.
Attached patch fix and testSplinter Review
Wow, great find; this goes back to fatvals. IIUC, this is a debug-only failure and does not affect correctness (since magic values are singletons).
Assignee: evilpies → lw
Status: NEW → ASSIGNED
Attachment #498431 - Flags: review?(jwalden+bmo)
(In reply to comment #1) > > I made some small mistake in my GetElement addition for arguments. I assumed > array holes, would be represented as JS_ARRAY_HOLE, but in fact JS_ARGS_HOLE, > is the right thing. If you change "array holes" to "arguments holes" in that sentence it matches the patch, and makes more sense :)
Comment on attachment 498431 [details] [diff] [review] fix and test +function test() { + delete arguments[1]; + return Array.prototype.join.call(arguments); +} +assertEq(test(1,2,3), "1,,3"); +reportCompare(true,true); Please add a second test that setting Object.prototype[1] will show through here too, just to be sure.
Attachment #498431 - Flags: review?(jwalden+bmo) → review+
Whiteboard: fixed-in-tracemonkey
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: