This is a soundness bug that was detected by MSVC in debug configuration.
The Summarizer::VariationKey has == and < operators.
In the case of <, the comparison wasn't properly handling the case where this->variation was greater than the parameter. In that case, it would fall back to comparing this->version which is incorrect (should only happen if the variations are equal.)
This could have affected the JSON serialization of the summary counters, mainly the order in which the array was serialized. I'm wondering if it could also caused bugs in actual counts. std::map uses the < operator to determine key equality.
This is a soundness bug that was detected by MSVC in debug configuration.
The
Summarizer::VariationKey
has==
and<
operators.In the case of
<
, the comparison wasn't properly handling the case wherethis->variation
was greater than the parameter. In that case, it would fall back to comparingthis->version
which is incorrect (should only happen if the variations are equal.)This could have affected the JSON serialization of the summary counters, mainly the order in which the array was serialized. I'm wondering if it could also caused bugs in actual counts.
std::map
uses the<
operator to determine key equality.