Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix][clang][server] Add report hash to the report_path_hash #3662

Merged
merged 1 commit into from
Apr 29, 2022

Conversation

steakhal
Copy link
Contributor

report_path_hash() is used for generating a report specific hash for
determining 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.

@steakhal
Copy link
Contributor Author

@dkrupp

@bruntib bruntib added this to the release 6.20.0 milestone Apr 28, 2022
`report_path_hash()` is used for generating a report specific hash for
determining 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`.
@steakhal steakhal force-pushed the fix-flaky-clangsa-reports branch from 02f46eb to 23c59c8 Compare April 28, 2022 14:56
@bruntib bruntib merged commit 0dfd98f into Ericsson:master Apr 29, 2022
@steakhal steakhal deleted the fix-flaky-clangsa-reports branch April 29, 2022 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants