RB: fix bad CP in the charPred for CipherOperation #9407
Merged
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.
I'm doing some on-the-side experiments into performance of the Ruby analysis.
One of those experiments caused something to change (inlining?), which caused a bad Cartesian product to materialize.
Here are the tuple counts:
The top line is a Cartesian product between all
CipherInstantiation
instances and allTNode
instances.To be clear: The bad Cartesian product doesn't appear to happen on
main
, but that is only due to some lucky inlining (I think).The problem is that the
input
field inCipherOperation
is only bound on one of the disjuncts of the charPred.This resulted in
CipherOperation::getAnInput
producing everyDataFlow::Node
exactly when it was supposed to have no results.And that is obviously wrong.
The solution is to just delete the
input
field, and movethis.getArgument(0)
down intogetAnInput
.Evaluation was uneventful.
An annoying thing is that this QL-for-QL PR I opened back in January would have caught it: #7669
I could use more volunteers for reviewing QL-for-QL.
Remember: every CodeQL engineer can approve QL-for-QL PRs, even if they are not a code-owner.