Repository navigation
Rust calls_out: matches! pattern operand blanked by a depth-unbounded scan (Part of #6454) - #8371
Merged
Merged
Conversation
… scan (Part of #6454) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…call (Part of #6454) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
Contributor
|
No description provided. |
5 of 6 tasks
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.
Part of #6454. No checklist key was named; the item is partly addressed: the ledger's named residual (
NotSpawned(e) if ..in bevy_ecs_world.rs) already no longer leaks; this closes the depth-bound leak and one real corpus leak. The remaining 40-oddtoken_tree<token_treereadings are expression constructors in macro arguments (correct calls, C3).Class
Rust
calls_out: the pattern operand ofmatches!/assert_matches!(anddebug_forms) is counted as a call when the operand cannot be reached by the depth- and length-bounded regex mask (_calls_out_masked_blocks). Same mechanism: any[debug_][assert_]matches!whose first operand nests 5+ parens deep, or holds a turbofish.Change
rust.py:_blank_matches_patterns, a bounded linear scan (<= 4000 chars per call, stops at the first unclosed call) called from_blank_binding_patterns. It blanks the second top-level argument up to a depth-0if, same length; first operand, guard and later args keep their calls. The regex mask stays. New testtest_calls_out_rust_matches_depth_6454.py(deep operands, guards, strings/chars, trailing comma, unbalanced, unclosed-run and long-operand timing).Golden drift
One line, both fixtures:
bevy_reflect_path.rsparse_invalidloses calleeInvalidIndex(Err(.. ParseError(Error::InvalidIndex(_)))is a pattern insideassert!(matches!(..))). Plus the derived graph_sqlite / llm_brief hashes.Facts checked
f::<A, B>(g(h(i(j(1)))))is mis-parsed by the old regex mask (it masks the operand's calls); removing the mask breakstest_mask_redos_immunity, so it stays.tests/extraction/languages -k rust502 passed; crucible_check showed only the drift above, then--update --yes.Sibling gaps
Cross-repo
None.
Lessons for agents
git checkout <file>to "undo one experiment" discards all uncommitted work in that file: commit WIP first.🤖 Generated with Claude Code