Repository navigation
fix(summaries): keep nothing of the blocks constant propagation proves unreachable - #259
Merged
Merged
Conversation
…s unreachable Closes #258
The fix of #258 keeps every cache key between commits of one version; the engine version, part of every key, is what delivers it to cached projects.
…eave it unwritten NonlocalWrite.kept says the function may return without writing the name, and no record means it never does; NonlocalResult carries the variable's value before the call, which the caller keeps there, joined with what may be written. A write that cannot run, a write on some paths only, or none at all no longer erases the caller's taint. PyIR schema 2, cache format 16. Part of #258.
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.
Summary
A summary carried the effects of blocks constant propagation proves unreachable: a sink, a return, a value merged at a join, an argument mutation under
if False:orwhile False:were reported at every caller, through any number of project functions.Change:
_DependenceProblem.flow) and is skipped by the final pass. Its stores, calls, returns and writes never happen, and the phis of its successors ignore it.Verification
tests/test_summary_reachability.py, new: 11 tests.if False/while False, a return, a value merged at a join, a mutated argument, and two levels of functions.No existing test or snapshot changed.
Mutation check: removing either guard fails the new tests.
Full suite green, apart from the local
test_packagingmetadata issue.ruff checkandmypyclean.Corpus: no finding added or removed in any of the 19 regression repositories, nor on mitmproxy (73 findings).
Closes #258