C++: Fix FPs on cpp/invalid-pointer-deref#10593
Merged
Merged
Conversation
| */ | ||
| final Node getAnInput(boolean fromBackEdge) { | ||
| localFlowStep(result, this) and | ||
| if phi.getBasicBlock().dominates(getBasicBlock(result)) |
Check warning
Code scanning / CodeQL
QL-for-QL encountered an internal consistency error
e4dc4c3 to
e430594
Compare
rdmarsh2
reviewed
Sep 27, 2022
| pragma[nomagic] | ||
| predicate pointerAddInstructionHasBounds( | ||
| PointerAddInstruction pai, DataFlow::Node sink1, Instruction sink2, int delta | ||
| PointerAddInstruction pai, DataFlow::Node sink1, DataFlow::Node sink2, int delta |
Contributor
There was a problem hiding this comment.
Why this change? Just a performance thing or is there some semantic difference I'm missing?
Contributor
Author
There was a problem hiding this comment.
Oh, right. Sorry. That was part of a solution that I ended up discarding. But I kept it in the PR since I liked the consistency of having both sinks be nodes instead of one being passed as a node and another being passed as an instruction.
So no, there is no behavior change from this at all.
rdmarsh2
approved these changes
Sep 27, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
It's super difficult to properly fix the FP I added in #10572. So for now I've decided to just block all flow through back-edges of phi nodes (as suggested by
@aschackmull) since this one one of the things that had to be present in order to get an FP here.