Closed
Bug 658564
Opened 14 years ago
Closed 14 years ago
If ExactStructContainer has a NULL finalizer it should not be allocated as a finalizable object
Categories
(Tamarin Graveyard :: Virtual Machine, defect)
Tamarin Graveyard
Virtual Machine
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: lhansen, Assigned: lhansen)
References
Details
(Whiteboard: has-patch)
Attachments
(1 file)
3.88 KB,
patch
|
treilly
:
review+
|
Details | Diff | Splinter Review |
Ideally it would be allocated in non-finalized memory so that the GC does not have to look at it to see if it's finalizable; at the very least the "finalize" bit should be turned off so that the empty constructor is not called.
Assignee | ||
Comment 1•14 years ago
|
||
There's a Serrano regression caused by this problem: AS2 variable arrays (internal to the AS2 ScriptObject) now use ExactStructContainer, while before they used GC::Callocated memory which was non-finalizable. So finalizers are invoked on all those variable arrays that are taken by the garbage collector, and if we had deeper testing we would have found that objects passed to GC::Free were finalizable but not finalized (contrary to what should be the case).
Assignee | ||
Comment 2•14 years ago
|
||
This is a mostly principled solution to the problem: extend the new operators for GCFinalizedObject so that it's possible to ask for no finalization at construction time. This ties in with segregated allocation for finalization and does not require exposing GC::ClearFinalize.
An even more principled solution would have been to introduce a new GC class, GCFinalizableObject; that seemed too much right now, and it can come later.
Attachment #534722 -
Flags: review?(treilly)
Assignee | ||
Comment 3•14 years ago
|
||
Probable slight performance regression for Serrano; I'm inclined to let it slide - it disappears in the noise around exact tracing anyway - and not push the fix to Serrano, but I'd like QRB backing for that.
Flags: flashplayer-qrb?
Whiteboard: has-patch
Comment 4•14 years ago
|
||
It would also be good to remove the storage for _finalizer when it wasn't required, especially for these power of two sized arrays. Like maybe finalizer could be a template parameter instead of a member.
Updated•14 years ago
|
Attachment #534722 -
Flags: review?(treilly) → review+
Assignee | ||
Comment 5•14 years ago
|
||
(In reply to comment #4)
> It would also be good to remove the storage for _finalizer when it wasn't
> required, especially for these power of two sized arrays. Like maybe
> finalizer could be a template parameter instead of a member.
I will make a note of that on the bug for generic array types.
Assignee | ||
Updated•14 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Flags: flashplayer-qrb? → flashplayer-qrb+
You need to log in
before you can comment on or make changes to this bug.
Description
•