[fix][clang][server] Add report hash to the report_path_hash #3662
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
report_path_hash()
is used for generating a report specific hash fordetermining if a bugreport should be saved in the database or not.
We skip duplicate bugreports.
Unfortunately, in some cases clangsa produced plists where an included
file had a context-insensitive bugreport at the exact same
file:row:col:checker, but different bug hash.
Previously, on the first was stored into the database, thus the
associated bug hash was nondeterministically choosen, causing a weird
behavior.
Imagine you store the same report directory different runs to the
server. One would expect that the diff between those runs is empty.
It was not the case!
By adding the report hash to the
report_path_hash
calculation,seemingly identical reports - with different report hashes - now will be
considered different.
This way if there are multiple reports to a header location, each
occurrences of that bug will be stored to the server if they have
different report hashes.
The users still can specify a non-default report hash generation for
changing this behavior e.g. by using the
--report-hash context-free-v2
.