Don't know why under Sanitizer build(asan/msan/ubsan), the std::unordered_map<string, ...>'s output order is reversed, make the regression test failed.
This change creates a workaround by using sorted container to make the output deterministic.
Differential D92816
[llvm-profgen][NFC] Fix test failure by making unwinder's output deterministic wlei on Dec 7 2020, 10:02 PM. Authored by
Details Don't know why under Sanitizer build(asan/msan/ubsan), the std::unordered_map<string, ...>'s output order is reversed, make the regression test failed. This change creates a workaround by using sorted container to make the output deterministic.
Diff Detail
Unit Tests
Event TimelineComment Actions Thanks for quick fix!
|
Does this work?
std::map<std::string, RangeSample> OrderedCounter(Counter.begin(), Counter.end());