Ruby: Generalize ArrayElementContent to ElementContent#7914
Merged
Conversation
735a84f to
dc8ec62
Compare
dc8ec62 to
c24b795
Compare
c24b795 to
83b541c
Compare
83b541c to
e6d1ec0
Compare
48af30c to
34eaded
Compare
To make it look more like `Argument` tokens.
34eaded to
790d977
Compare
nickrolfe
reviewed
Apr 28, 2022
nickrolfe
left a comment
Contributor
There was a problem hiding this comment.
Looks good – just a couple of minor issues.
Note I didn't review the changes to Array.qll and array-flow.expected in detail, but I sampled a few of them randomly, and they looked fine.
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.
The first commit generalizes
ArrayElementContenttoElementContent, by generalising from integer indicesTKnownArrayElementContent(int i)to arbitrary constant valuesTKnownElementContent(ConstantValue cv). This means that we will be able to precisely track e.g. stores into hashes with a known symbol key (but actually reading them back out will be done in a follow-up PR).The second commit changes the
Elementtoken toElement[any], to be consistent withArgumenttokens.DCA reported one missing result for
rb/request-forgeryondiaspora, which turned out to be a false positive result that is now filtered away because of the added precision.