Conversation
Comment on lines
+2150
to
+2152
| /** | ||
| * The given `read` reads multiple variables at once. `var` is bound to one of them. | ||
| */ |
asgerf
force-pushed
the
ssa/multiple-reads-v2
branch
from
October 2, 2026 13:36
f0d12fb to
bfd363b
Compare
These consistency violations originate from the VariableCapture instantation in C#, JS, Python, and Ruby.
The previously-added consistency errors are gone.
Unified also had consistency errors from its LocalSSA instantiation, due to its use of synthetic read nodes to represent post-update positions. Many variables can have a post-update at the same CFG node.
asgerf
force-pushed
the
ssa/multiple-reads-v2
branch
from
October 2, 2026 14:23
bfd363b to
1bbd5d5
Compare
Many tests passed for the wrong reasons, due to the SSA bug. We need more library/operator modelling to actually find these flows.
Switched to TaintTracking and adds some very ad-hoc steps to recover most of the results. Some more tests pass and others fail; these are now consistent with what we actually model.
asgerf
force-pushed
the
ssa/multiple-reads-v2
branch
2 times, most recently
from
October 2, 2026 14:55
1bbd5d5 to
2c637ab
Compare
This branch has not been deployed
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.
Fixes an issue with the SSA data-flow integration library that occurs when multiple variables are read at the same CFG node.
This situation happens when it is instantiated from the VariableCapture library. It also happens in unified due to how we use synthetic reads to mark post-update positions.
The assumption has a subtle presence in this bit of code:
Since
thisis only bound to the expression, thevariableReadjoin can fan out to multiple variables when not uniquely determined by the CFG node. Even ifExpris constructed to be unique to the variable, the correlation is forgotten in this join and they get mixed up anyway. The fix was to makeTExprNodeunique to a specific variable.The real culprit is the
Exprclass from the data-flow integration input. I propose we removeExprentirely and replaceExprNodewithReadNode: a canonical representative for a(bb,i,v)triple from thevariableReadinput, and likewise forPostUpdateNode. But such a change is too large for this PR as it requires language-specific refactorings. But the fix is essentially a precursor to this solution: whenExpris a CFG node,ReadNodeis effectively a(bb,i,v)triple as it rightfully should be.