C++: Don't use GVN as SSAVariable in new range analysis #14713
Merged
+5
−48
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.
In #10555 I added very specialized code to the range analysis library to catch a very specific pattern motivated by https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10160. This worked really well to convince ourselves that this query can catch real-world issues. Unfortunately, using a value number as an SSA variable gives some weird results because GVN doesn't behave as SSA would.
This PR basically reverts the above PR. We can then figure out how to properly do this once @aschackmull is done with his ongoing work on sharing the range analysis code between C/C++ and Java.