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)
Tracking
()
RESOLVED
FIXED
People
(Reporter: decoder, Assigned: luke)
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(2 files)
|
556 bytes,
patch
|
Details | Diff | Splinter Review | |
|
1.72 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
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
Updated•15 years ago
|
Assignee: general → evilpies
Comment 1•15 years ago
|
||
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.
| Assignee | ||
Comment 2•15 years ago
|
||
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).
Comment 3•15 years ago
|
||
(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 4•15 years ago
|
||
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+
| Assignee | ||
Comment 5•15 years ago
|
||
Sounds good.
http://hg.mozilla.org/tracemonkey/rev/42bc53a5b27f
Whiteboard: fixed-in-tracemonkey
Comment 6•15 years ago
|
||
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.
Description
•