Closed Bug 608708 Opened 14 years ago Closed 6 years ago

Need a structured way to store different pointers in one location

Categories

(Tamarin Graveyard :: Garbage Collection (mmGC), defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: treilly, Assigned: treilly)

References

Details

(Whiteboard: safegc)

Attachments

(1 file)

If all write barriers are pointer types we can specialize using template on the type but that breaks when you have a DWB(uintptr_t) like this. Also for things static analysis tools typing a pointer field as a pointer is important.
Attachment #487318 - Flags: review?(wsharp)
Not I'm not assigning this to myself, its a good change but its not blocking things at the moment, just storing if for safe keeping, goal is to dust it off and push it later. Note that this gets a little cleaner if GCFinalizedObject inherits from GCObject but that isn't a dependency.
To offer a more robust suggestion: maybe instead of this, add a new parallel smart pointer that knows it's a pointer-and-tag pair; that one would also have all the pointer accessors (eg operator->) clear the tag bits of the returned value. That's a tool we could use in lots of other places too.
+1, a smart pointer that understands types and the invariants for each tag would be nice. The typical pattern is no DWB, plus explicit WB() calls in setters. This bug is just one more reason to have it.
Attachment #487318 - Flags: review?(wsharp)
That smart pointer type needs to be provided by MMgc then. It's a good idea. That way we can codify the use of the three lower bits of a pointer for random tags; tag interpretation becomes a mutator concern. (I've run into similar issues for exact tracing. uintptr_t works well enough for my needs, but something more structured wouldn't hurt. The worst thing is something that's declared as a pointer field but actually carries tags. Unions are pretty awful too but can be dealt with.)
This is needed for safegc
Blocks: 565664
Status: NEW → ASSIGNED
Summary: E4XNode m_children should use a pointer type → Need a structured way to store different pointers in one location
Blocks: 623276
No longer blocks: 565664
In case its useful, here is an example PointerIntPair<> utility template from LLVM: http://llvm.org/doxygen/PointerIntPair_8h_source.html#l00041
Priority: P4 → --
this is needed for my exact tracing safety net. Here's two examples: E4Node uintptr_t GC_POINTER(m_nameOrAux); InlineHashtable: uintptr_t GC_POINTER(m_atomsAndFlags); I think we want something like: E4Node GCTaggedMember<String,E4XNode> GC_POINTER(m_nameOrAux); InlineHashtable: GCTaggedMember<AtomContainer> GC_POINTER(m_atomsAndFlags);
Assignee: nobody → treilly
Priority: -- → P2
Target Milestone: Future → Q1 12 - Brannan
Blocks: 624512
Flags: flashplayer-qrb+
Target Milestone: Q1 12 - Brannan → Future
Status: ASSIGNED → NEW
Whiteboard: safegc
Tamarin is a dead project now. Mass WONTFIX.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: