Closed
Bug 653026
Opened 13 years ago
Closed 13 years ago
GC hazard with NoSuchMethod
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: billm, Assigned: billm)
References
Details
(Keywords: regression, Whiteboard: [sg:critical?][fixed-in-tracemonkey][in-testsuite?])
Attachments
(2 files)
148 bytes,
text/plain
|
Details | |
3.23 KB,
patch
|
Waldo
:
review+
dmandelin
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
This script crashes in a shell with no jit options.
Updated•13 years ago
|
Whiteboard: [sg:critical?]
Assignee | ||
Comment 1•13 years ago
|
||
The basic problem is that the new object being allocated in js_OnUnknownMethod is the only thing that roots the method. This object is not scanned during a GC because it has a NULL shape, so it's treated as a newborn object. This was apparently sort of intentional, to ensure that these objects don't escape into user code. However, I think it's more important that we scan them. I set the shape so that the object looks non-native, and then I added a trace hook to the class. I thought about making it a native object, but I think then we'd need a proto for it, and I didn't want to deal with that. Please correct me if I'm wrong, Jeff.
Assignee: general → wmccloskey
Status: NEW → ASSIGNED
Attachment #528630 -
Flags: review?(jwalden+bmo)
Comment 2•13 years ago
|
||
Comment on attachment 528630 [details] [diff] [review] patch Sounds reasonable.
Attachment #528630 -
Flags: review?(jwalden+bmo) → review+
Comment 3•13 years ago
|
||
Can this land now that it's reviewed n' all? Would this patch be safe for beta?
tracking-firefox5:
--- → ?
tracking-firefox6:
--- → ?
Assignee | ||
Comment 4•13 years ago
|
||
Sorry for the delay. I meant to land it yesterday but I forgot. I'll make sure it gets into the beta.
Assignee | ||
Comment 5•13 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/10ba4918f08e I pushed without the test. That needs to go in later.
Whiteboard: [sg:critical?] → [sg:critical?][fixed-in-tracemonkey][in-testsuite?]
Comment 6•13 years ago
|
||
cdleary-bot mozilla-central merge info: http://hg.mozilla.org/mozilla-central/rev/10ba4918f08e
Updated•13 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Updated•13 years ago
|
Attachment #528630 -
Flags: approval-mozilla-beta+
Comment 7•13 years ago
|
||
http://hg.mozilla.org/mozilla-beta/rev/cb0b3bc9c53b
status-firefox5:
--- → fixed
Comment 8•13 years ago
|
||
This made it to mozilla-aurora as http://hg.mozilla.org/mozilla-aurora/rev/10ba4918f08e
Updated•13 years ago
|
status-firefox6:
--- → fixed
Comment 9•13 years ago
|
||
On the 1.9.2 branch I get "TypeError: obj.x(a()) is not a function" rather than a crash. Does that mean that branch is not affected by this bug? Do we know what regressed it?
blocking1.9.2: --- → ?
status1.9.2:
--- → ?
Assignee | ||
Comment 10•13 years ago
|
||
It looks like the testcase in the bug regressed in bug 584917, so 3.6 should be safe. Before that patch, we rooted the function to call via the NoSuchMethod object's parent (or proto, I forget the argument order). I'm still a bit worried about whether the other thing stored in the NoSuchMethod object in rooted. It can only be a jsid, but it seems like e4x might somehow allow an object to be stashed there. I don't really understand the code too well though. It would be good if someone who understands e4x better could take a look. I'm guessing this means Brendan or Igor?
Comment 11•13 years ago
|
||
Thanks, for now we'll not track this on the old branch.
Updated•13 years ago
|
Group: core-security
Comment 12•13 years ago
|
||
Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20100101 Firefox/6.0 Could you please provide some clear STR in order to verify this issue?
You need to log in
before you can comment on or make changes to this bug.
Description
•