Closed Bug 519947 Opened 15 years ago Closed 14 years ago

TM: remove newborn pigeon hole

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 572057

People

(Reporter: gal, Assigned: gal)

References

Details

Attachments

(1 file)

We scan the native stack for reference now, so as long the value is held on the stack somewhere (or in a register), there is no need for pigeon holes any more.

Igor, if you want to grab this go ahead. I think you are more qualified than me. Otherwise I will get to this in a couple days when the stack scanning patch is in.
Blocks: 519949
I suspect that even with a conservative stack scanning we cannot just remove newborns. As with local roots, the problem is that we have to make sure that a newborn copy really lives on the native stack and not in some malloced structure. Monitoring all the code to check for that is not straightforward task.
Attached patch patchSplinter Review
Assignee: general → gal
Weak references are meant to ensure rooting until the call site of NewGCThing had a chance to root it. Code like #1 is completely unreasonable and must be fixed. Fuzzing and code review will hopefully reveal it (if it really exists). Though, I am pretty sure we don't do this kind of insanity and I spent quite some time looking at our rooting mechanisms. This patch is a 10ms speedup or so for SS.
Makes this crash with -j:

for (let j = 0; j < 3; ++j)
  try { for(let y=0;y<3;++y) { } with(null) { } } catch(e) { }
for each (let z in [false, false, false]) { }
for (let m = 0; m < 4; ++m) { gc(); }
#4 actually crashes the conservative stack scanner. This patch isn't needed.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: