Closed Bug 452338 Opened 12 years ago Closed 12 years ago

TM: "Assertion failure: obj2 == obj" modifying __count__

Categories

(Core :: JavaScript Engine, defect, critical)

x86
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: mrbkap)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, regression, testcase)

Attachments

(1 file, 1 obsolete file)

./js -j
js> for (var j = 0; j < 4; ++j) __count__ = 3;

Assertion failure: obj2 == obj, at jstracer.cpp:4982

I'm using a js shell compiled from the tracemonkey branch.
Attached patch Fix (obsolete) — Splinter Review
It doesn't make sense to run the count getter on set. A silent failure seems to preserve the old behavior and we do less work now.
Assignee: general → mrbkap
Status: NEW → ASSIGNED
Attachment #335812 - Flags: review?(brendan)
Comment on attachment 335812 [details] [diff] [review]
Fix

>Bug 452338 - Abort on the weird case where we find a global name on the prototype of the scope chain.
>
>diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp
>--- a/js/src/jsobj.cpp
>+++ b/js/src/jsobj.cpp
>@@ -139,8 +139,8 @@ static JSPropertySpec object_props[] = {
>                                                   obj_getSlot,  obj_setSlot},
>     {js_parent_str,JSSLOT_PARENT,JSPROP_READONLY|JSPROP_PERMANENT|JSPROP_SHARED,
>                                                   obj_getSlot,  obj_setSlot},
>-    {js_count_str, 0,            JSPROP_PERMANENT|JSPROP_SHARED,
>-                                                  obj_getCount, obj_getCount},
>+    {js_count_str, 0,            JSPROP_PERMANENT|JSPROP_READONLY|JSPROP_SHARED,

Should match the READONLY|PERMANENT|SHARED order for parent, eh?

>+        ABORT_TRACE("found a non-direct property on the global object");

I've taken to saying "JSOP_BINDNAME found a ..." and the like.

r=me with these.

/be
Attachment #335812 - Flags: review?(brendan) → review+
Attached patch For checkinSplinter Review
I'm going to end up checking this in on tracemonkey.
Attachment #335812 - Attachment is obsolete: true
Attachment #335814 - Flags: review+
http://hg.mozilla.org/tracemonkey/rev/2206c4127fad
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Summary: "Assertion failure: obj2 == obj" modifying __count__ → TM: "Assertion failure: obj2 == obj" modifying __count__
/cvsroot/mozilla/js/tests/js1_5/extensions/regress-452338.js,v  <--  regress-452338.js
initial revision: 1.1

http://hg.mozilla.org/mozilla-central/rev/8db3af41e55a
Flags: in-testsuite+
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.