Repository navigation
NFR walks: explicit worklist, not native recursion, over typed bodies (floor stack overflow) - #12996
Merged
Merged
Conversation
…odies
The required floor runs typed_collect_wildcard_arms (and fac_walk_body_marks under
it) on the main thread; native recursion over corpus-shaped body depth overflowed
the stack on gunbc#12526's widened diff scope ('main' has overflowed its stack,
right after strict-preparation, twice). Visit order is immaterial: facts and
undetermined sites are sorted by the caller and marks are booleans.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…'s verdict call on an 8 MiB thread Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gunbai-bot Bot
pushed a commit
that referenced
this pull request
Oct 2, 2026
…s, drop the stacker blocks Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gunbai-bot Bot
pushed a commit
that referenced
this pull request
Oct 2, 2026
#12987) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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 required floor's non-fold-residue check (gunbc#12610) walked typed bodies by native recursion on the main thread:
typed_collect_wildcard_arms(v1_compiler.cli_run.non_fold_residue) andfac_walk_body_marks(v1_compiler.cli_run) under it. Body depth is corpus-shaped, so this is the unbounded native-stack walk class (gunbc#10610). On gunbc#12526's widened diff scope the floor aborted twice at the same point, right afterstrict-preparationcompleted (5,541 modules):thread 'main' has overflowed its stack. It printed no refusal row and no typed cause.Repair
Both walkers now use an explicit worklist. The thread and its stack size are unchanged; moving the walk onto a bigger-stack thread would only raise the threshold. Nothing else changes: the same nodes are visited, the same facts and marks are produced, and the caller still sorts
factsandundetermined_sites.Receipts (by execution)
nfr_typed_tests::deep_body_is_judged_on_a_main_thread_sized_stack): the fixture is a 20,000-term+chain. It is typed on a large-stack thread, then judged by the floor's own call,non_fold_residue_diff_verdict, on an 8 MiB thread (the Linux main-thread size).19e0d49: passes (44 s). All 15non_fold_residuetests pass; clippy-D warningsis clean.origin/main's walkers restored and the same test:thread '<unknown>' has overflowed its stack, rc=101.typed_fallback_arm_walk, unfiltered) ran over the entry closure of gunbc#12512's changed.dagfiles (98 entries → 1,115 sources, 1,113 typed modules), on a 1 GiB thread where base doesn't overflow. The base and head reports are byte-identical, sha256ebc3062c…, with an empty diff. The report covers 744 facts (site, class, closed, lane), 524 residue sites, 9 undetermined sites and every covered path.cargo test --libruns on no CI path (declared dropgunbc.rung_droprust_unit_tests_off_the_merge_path). The control is enrolled in the unit-test population, but it doesn't block a merge until that lane returns.Seed standing
This modifies hand-written host Rust in the v1 seed. Under
gunbc.v1_maintenance_standingv1_seed_standing, it is admitted by purpose: it serves the required floor, the gate every v2 change lands through. It adds no semantics and no growth surface: two walkers change shape and one test is added.Coordination
stacker::maybe_grow, because its floor hit the same overflow. Agreed with its owner: whichever PR lands second takes this PR's worklist versions of both functions and drops thestackerblocks.🤖 Generated with Claude Code