-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Summarizer::VariationKey operator< was unsound (#412)
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.
- Loading branch information
1 parent
af0333f
commit 57f45b2
Showing
2 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters