Closed
Bug 418889
Opened 17 years ago
Closed 17 years ago
Instances of builtin types only referenced from the local variables can get prematurely collected
Categories
(Tamarin Graveyard :: Virtual Machine, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: treilly, Assigned: treilly)
Details
Attachments
(1 file, 2 obsolete files)
2.74 KB,
patch
|
Details | Diff | Splinter Review |
(Note: Found in FP 9.0.115.0 aka MovieStar)
Steps to reproduce:
1. Launch Photoshop Express on FP 9.0.115.0
2. Launch Editor
3. Select crop/rotate
4. Pick up one of the crop handles and drag crop rectangle around
Actual Results: Intermittent flashing of rectangle while cropping. This is indicative of this particular sort of failure:
private function f()
{
var p = new Point(1,1);
var x:Number = p.x;
var y:Number = p.y;
for(var i:int=0;i<10000;i++) { new Point(0,0); }
x = p.x;
y = p.y;
trace(x+y)
}
Intermittently, the traced output will be 0 because foo will have been incorrectly collected when the other allocations take place.
Expected Results: No flashing.
Workaround (if any):
If you subclass the built in type with a user defined type and use those types instead the JIT behaves differently and this problem doesn't arise.
Transferred Comments:
treilly - Thu Feb 21 14:58:55 CST 2008
I updated the bug to make it clearer
Assignee | ||
Comment 1•17 years ago
|
||
Comment 2•17 years ago
|
||
Comment on attachment 304811 [details] [diff] [review]
Hacky fix
equivalent but less hacky/risky fix would be to add a new MIR opcode, MIR_addptr, identical to MIR_add, except without the MIR_cse flag.
if we find any other places we're doing pointer math, its easy to change LIR_add to LIR_addptr
Assignee | ||
Comment 3•17 years ago
|
||
If we're gonna go that far why not just make cseMatch call extendLast use on the MIR_addptr's oprnd2? would extendLastUse(ins, ip, ip) work?
Assignee | ||
Comment 4•17 years ago
|
||
I scanned all MIR_add/sub's and this is the only instance of pointer math.
Assignee | ||
Comment 5•17 years ago
|
||
Ed says:
the extra
> add's in x86 cost less than the extra store/loads from higher
> register pressure.
>
so I'll roll the MIR_addptr idea and forget about trying to make cse work.
Assignee | ||
Comment 6•17 years ago
|
||
Attachment #304811 -
Attachment is obsolete: true
Attachment #304821 -
Flags: review?(edwsmith)
Attachment #304811 -
Flags: review?(edwsmith)
Assignee | ||
Updated•17 years ago
|
Attachment #304821 -
Flags: review?(rreitmai)
Comment 7•17 years ago
|
||
Comment on attachment 304821 [details] [diff] [review]
Less hacky but essentially the same fix
ok,so teh ptr, is no longer getting cse'd but still, the exterior pointer may not survive past the wb call; no? Did I miss some code?
Attachment #304821 -
Flags: review?(rreitmai) → review+
Assignee | ||
Comment 8•17 years ago
|
||
The real pointer will have to still be around for additional set/get slot operations b/c we aren't letting CSE happen on the derived pointer the object will be visible.
Using the unoffset pointer for the WB calls is really just fixing another bug (that Apollo ran into a couple weeks ago).
Comment 9•17 years ago
|
||
Comment on attachment 304821 [details] [diff] [review]
Less hacky but essentially the same fix
looks good to me, clearly x-platform testing is a must.
Attachment #304821 -
Flags: review?(edwsmith) → review+
Assignee | ||
Comment 10•17 years ago
|
||
Attachment #304821 -
Attachment is obsolete: true
Assignee | ||
Comment 11•17 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 12•16 years ago
|
||
Resolved fixed engineering / work item that has been pushed. Setting status to verified.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•