Skip to content

Rust: Expose counts of data flow inconsistencies #17908

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

Merged
merged 4 commits into from
Nov 6, 2024
Merged

Conversation

geoffw0
Copy link
Contributor

@geoffw0 geoffw0 commented Nov 4, 2024

Rust: expose counts of data flow inconsistencies in rust/summary/summary-statistics and new diagnostic query rust/diagnostics/data-flow-consistency-counts. This (the former, at the moment) will allow us to display data flow inconsistencies in DCA runs.

Shared: there's a change to the shared library DataFlowImplConsistency.qll in the addition of a predicate getInconsistencyCounts. It's not super clean as it duplicates some information from the existing query predicates - but on the other hand it prevents that duplication from having to go any further (e.g. into language specific diagnostic queries). There might be a nicer way to do this, perhaps involving an abstract class DataFlowInconsistency that collects all results in one place ... but that would inevitably end up changing how results are listed in .expected files (probably for the worse). I'm open to better ideas.

@geoffw0 geoffw0 added the Rust Pull requests that update Rust code label Nov 4, 2024
@geoffw0 geoffw0 requested a review from paldepind November 4, 2024 19:35
@geoffw0 geoffw0 added the no-change-note-required This PR does not need a change note label Nov 4, 2024
@geoffw0
Copy link
Contributor Author

geoffw0 commented Nov 5, 2024

DCA LGTM (it doesn't show the new data anywhere yet; but the new query is run and doesn't cause any problems)

Copy link
Contributor

@paldepind paldepind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

About the duplication: It doesn't seem so bad to me and FWIW I can't think of any way of phrasing it that would be simpler.

@geoffw0 geoffw0 merged commit b3f7a8a into github:main Nov 6, 2024
37 of 39 checks passed
@geoffw0 geoffw0 deleted the dfcons branch January 20, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DataFlow Library no-change-note-required This PR does not need a change note Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants