This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Make the order in which ClusterManager calls destructors deterministic
ClosedPublic

Authored by teemperor on Feb 3 2020, 3:54 AM.

Details

Summary

ClusterManager is using a SmallPtrSet to store the objects in it. We always only add every object once so using a set is not necessary.
Furthermore having a set means that iterating over it is nondeterministic (at least with more than 16 objects in it), so the order in
which the destructors for the managed objects are called is currently also non-deterministic.

This just replaces the SmallPtrSet with a SmallVector.

Diff Detail

Event Timeline

teemperor created this revision.Feb 3 2020, 3:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 3 2020, 3:54 AM
labath accepted this revision.Feb 3 2020, 4:21 AM
This revision is now accepted and ready to land.Feb 3 2020, 4:21 AM
This revision was automatically updated to reflect the committed changes.