Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

[MemProf] Use MapVector to avoid non-determinism
ClosedPublic

Authored by tejohnson on May 4 2023, 9:00 PM.

Details

Summary

Multiple cases of instability in the cloning behavior occurred due to
iteration of maps indexed by pointers. Fix by changing the maps to
MapVector. This necessitated adding DenseMapInfo specializations for the
structure types used in the keys.

These were found while trying to commit patch 3 of the cloning
(bfe7205975a63a605ff3faacd97fe4c1bf4c19b3), but the second one turned
out to be in code committed in patch 2, but just exposed by a new test
added with patch 3. Specifically, the iteration in identifyClones().

Added the portion of the new test cases from patch 3 that only relied on
the already committed changes and exposed the issue.

Diff Detail