Closed
Bug 628355
Opened 15 years ago
Closed 14 years ago
GCMember's inheriting from GCRef opens us up for missing write barriers
Categories
(Tamarin Graveyard :: Garbage Collection (mmGC), defect, P2)
Tamarin Graveyard
Garbage Collection (mmGC)
Tracking
(Not tracked)
RESOLVED
FIXED
Q3 11 - Serrano
People
(Reporter: treilly, Assigned: treilly)
References
Details
Attachments
(5 files)
Say I have a function:
void retrieve(GCRef<Foo>& t);
I can do:
GCRef<Foo> t;
retrieve(t);
But I can also pass a GCMember since GCMember inherits from GCRef and blamo, missing write barrier.
Updated•15 years ago
|
Flags: flashplayer-bug+
Updated•15 years ago
|
Priority: P2 → P3
Updated•15 years ago
|
Priority: P3 → P4
Updated•15 years ago
|
Priority: P4 → P3
Updated•14 years ago
|
Priority: P3 → --
Target Milestone: Q3 11 - Serrano → Future
Updated•14 years ago
|
Assignee: nobody → treilly
Priority: -- → P2
Target Milestone: Future → Q3 11 - Serrano
Comment 1•14 years ago
|
||
Memo to all: descriptive bug titles makes it easier to understand whether a bug is important, when skimming a bug list...
Summary: Should GCMember inherit from GCRef? → GCMember's inheriting from GCRef opens us up for missing write barriers
| Assignee | ||
Comment 2•14 years ago
|
||
Spotted in the wild WE #2869733
| Assignee | ||
Updated•14 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 3•14 years ago
|
||
Okay I spent some time searching for a way to solve this w/o making GCRef not inherit from GCMember and none occurred to me or worked.
Comment 4•14 years ago
|
||
(In reply to comment #3)
> Okay I spent some time searching for a way to solve this w/o making GCRef
> not inherit from GCMember and none occurred to me or worked.
What do we actually need to support the majority of the use cases? Could we get away with removing the inheritance relationship and putting in a cast operator, i.e. operator (GCMember<T>)()?
| Assignee | ||
Comment 5•14 years ago
|
||
| Assignee | ||
Comment 6•14 years ago
|
||
| Assignee | ||
Comment 7•14 years ago
|
||
| Assignee | ||
Comment 8•14 years ago
|
||
| Assignee | ||
Comment 9•14 years ago
|
||
Use asserts to fix this issue, I could find no solution that made GCMember not inherit from GCRef that didn't involve fixing hundreds of compile errors in the player (that would have required .staticCast<T>() to downcast things where it isn't needed today). An assert is almost as good.
Attachment #533044 -
Flags: review?(lhansen)
Comment 10•14 years ago
|
||
Comment on attachment 533044 [details] [diff] [review]
Assert when a GCRef or GCRef_Union is used to write to GC memory
I fear we're heading down the wrong path here. The reality appears to be that GCRef and GCMember are simply two different things, and should not be related by (sub)type. That C++ cannot express their relationship reasonably well is unfortunate but should that force us to invent a relationship that does not exist?
| Assignee | ||
Comment 11•14 years ago
|
||
I agree (otherwise I wouldn't have spent days trying to come up with a solution) but I didn't want to spend even more time changing hundreds of lines of player code to make this change. The asserts were effective at catching the two places we did this in the code (we #2782301 and #2869733).
Comment 12•14 years ago
|
||
Comment on attachment 533044 [details] [diff] [review]
Assert when a GCRef or GCRef_Union is used to write to GC memory
R+ then.
Attachment #533044 -
Flags: review?(lhansen) → review+
Comment 13•14 years ago
|
||
changeset: 6338:15cf30169408
user: Tommy Reilly <treilly@adobe.com>
summary: Bug 628355 - Assert when a GCRef is used to write to GC memory bypassing write barrier (r=lhansen)
http://hg.mozilla.org/tamarin-redux/rev/15cf30169408
| Assignee | ||
Updated•14 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 14•14 years ago
|
||
(In reply to comment #13)
> changeset: 6338:15cf30169408
> user: Tommy Reilly <treilly@adobe.com>
> summary: Bug 628355 - Assert when a GCRef is used to write to GC memory
> bypassing write barrier (r=lhansen)
>
> http://hg.mozilla.org/tamarin-redux/rev/15cf30169408
Reopening bug, patch has not landed in tamarin-redux-serrano for this serrano targeted bug
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Updated•14 years ago
|
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•