You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rustlantis: make uninit reference invalidation transitive #1158
PlaceGraph::mark_place_uninit currently removes the outgoing Deref edge only when the place being marked uninitialized is itself a pointer:
// If this is a pointer, we have to remove the Deref edge, but not for other projections// FIXME: this should be transitive
This leaves stale Deref edges when an aggregate containing references or raw pointers is marked uninitialized.
For example, if a tuple contains nested pointer values, marking the tuple uninitialized clears its storage but does not invalidate the pointer relationships represented by those nested nodes.
Expected behavior
When a place is marked uninitialized, outgoing Deref edges belonging to pointer/reference values contained transitively in that place should also be removed.
Incoming Deref edges from pointer/reference values outside the place should
not be removed by this operation. Those pointers retain their graph relationship
to the place, while their validity reflects the pointee becoming uninitialized.
Suggested approach
Traverse the structural subfields of the place independently from the existing memory-initialization traversal and remove outgoing Deref edges from every pointer/reference node encountered.
A separate traversal is needed because the current memory traversal stops once it reaches a node backed by a RunPointer.
Acceptance criteria
Marking a nested aggregate uninitialized removes outgoing Deref edges from contained references.
The same applies to contained raw pointers.
Incoming Deref edges from pointer/reference values outside the aggregate are preserved.
Activity