X Tutup
The Wayback Machine - https://web.archive.org/web/20240209162428/https://github.com/github/codeql/pull/15507
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

Shared: fix a bug in stateful outbarriers #15507

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

asgerf
Copy link
Contributor

@asgerf asgerf commented Feb 1, 2024

Fixes a bug in the handling of stateful out-barriers.

These were initially placed at the very last pruning step, since they aren't relevant for pruning in practice.

However, subpaths is computed in a way that isn't affected by the pruning, whereas edges is affected. This can result in a tuple subpaths(arg, par, ret, res) where edges*(par, ret) does not hold.

This means we get a spurious arg -> res edge, which can result in a spurious alert. And this alert is missing its data flow path, because no path can be materialised for par -> ret.

The solution I've opted for is just to check the out-barrier when we generate the steps that feed into pathStep. I've verified (for one query) that when stateful out-barriers aren't in use, the DIL is unaffected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant
X Tutup