Last Comment Bug 654073 - Crash [@ js_GetClassPrototype] or [@ JSID_IS_VOID] or [@ js::PropertyTable::search]
: Crash [@ js_GetClassPrototype] or [@ JSID_IS_VOID] or [@ js::PropertyTable::s...
: crash, regression, testcase
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: x86 Linux
-- critical (vote)
: ---
Assigned To: Paul Biggar
: Jason Orendorff [:jorendorff]
Depends on:
Blocks: 630996 642772
  Show dependency treegraph
Reported: 2011-05-02 03:31 PDT by Gary Kwong [:gkw] [:nth10sd]
Modified: 2013-01-14 08:23 PST (History)
9 users (show)
choller: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

stack (16.80 KB, text/plain)
2011-05-02 03:31 PDT, Gary Kwong [:gkw] [:nth10sd]
no flags Details
Fix (1.21 KB, patch)
2011-05-03 06:22 PDT, Paul Biggar
jwalden+bmo: review+
Details | Diff | Splinter Review

Description User image Gary Kwong [:gkw] [:nth10sd] 2011-05-02 03:31:57 PDT
Created attachment 529442 [details]

for (i = 0; i < 9; i++) {
    for (x in Math.__proto__) {}
    try {
        Math.__proto__.__proto__ = this
    } catch (e) {}
    __proto__ = null

crashes js opt shell on TM changeset e2843f43757e without -m nor -j at js_GetClassPrototype and crashes js debug shell at JSID_IS_VOID or js::PropertyTable::search.

autoBisect shows this is probably related to the following changeset:

The first bad revision is:
changeset:   68345:881c06ebc5ee
user:        Paul Biggar
date:        Wed Apr 27 04:13:56 2011 -0700
summary:     Bug 642772: Don't recreate a class during enumeration, if it has been deleted (r=bhackett)
Comment 1 User image Jeff Walden [:Waldo] (remove +bmo to email) 2011-05-02 08:22:22 PDT
It's a stack overflow trying to init the Iterator class for the StopIteration object, which has JSCLASS_FREEZE_PROTO, and it looks like that [[Prototype]] is somehow the global object, which means you enumerate standard classes before freezing, which means you init the Iterator class...

Did a MarkStandardClassInitializedNoProto get omitted for the Iterator class or something?  That's the only thing that looks obviously plausible as the blame-catcher in the regressor.

Bootstrapping genericity delenda est.
Comment 2 User image Paul Biggar 2011-05-03 06:22:14 PDT
Created attachment 529700 [details] [diff] [review]
Comment 3 User image Jeff Walden [:Waldo] (remove +bmo to email) 2011-05-03 11:29:58 PDT
Comment on attachment 529700 [details] [diff] [review]

>diff --git a/js/src/jit-test/tests/basic/bug654073.js b/js/src/jit-test/tests/basic/bug654073.js

>+this.__proto__ = null;
>+Math.__proto__.__proto__ = this;
>+for (x in Math.__proto__) {}

I think this would be a clearer equivalent that's easier to read, because it doesn't require dredging up prototype chain details from memory:

this.__proto__ = null;
Object.prototype.__proto__ = this;
for (var x in Object.prototype);
Comment 5 User image Chris Leary [:cdleary] (not checking bugmail) 2011-05-10 15:14:44 PDT
cdleary-bot mozilla-central merge info:
Comment 6 User image Christian Riechers 2012-01-08 06:51:16 PST
TB9.0.1 crashed. OS is openSuSE 11.4.
Please re-open this bug.
Crash Signature: [@ js::PropertyTable::search ]
ID: 0463ff9f-d0fd-4642-bb16-50e2d2120108
Comment 7 User image Christian Holler (:decoder) 2013-01-14 08:23:39 PST
A testcase for this bug was automatically identified at js/src/jit-test/tests/basic/bug654073.js.

Note You need to log in before you can comment on or make changes to this bug.