WIP: Deterministic HeapHashSet iteration draft#584
Conversation
|
As we have just discussed: It might be less intrusive/worth investigating to use |
|
I tried a couple of approaches to getting pointer registration working on garbage collected objects but haven't been able to get much of a handle on destruction behavior during GC sweep. The first was to try unregistering pointers during pre-finalization and the second was to try to add a destructor implementation to It's a bit frustrating because it feels like it shouldn't be too hard to get something to work. |
Work in progress toward getting all uses of
HeapHashSetiteration to have stable ordering between record and replay.There's a lot to be improved here but it mostly demonstrates what kind of changes might be required to get more coverage using compile-time techniques.
After working through these changes over the past few days, I think @oridb's upcoming container changes (iteration order based on insertion order) might be a more maintainable path toward consistent ordering, in general.
Some of the challenges with the compile-time techniques:
static_asserttoHeapHashSet::beginwas the most reliable way that I found to easily identify forward declaration issues. But there's no good way to disambiguate between types that are actually missing aRecordReplayIdmethod and incomplete types that already have aRecordReplayIdmethod.recordreplay::RecordReplayIdMixinacross a large number of header files does significantly increase compile times after changingbase/record_replay.h.