You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ownership audit uses a dense 7 GB state matrix for the in-unit regex match body #1173
The native ownership validator allocates a dense block-by-place matrix and repeatedly copies complete rows, making an unbundled stage1 audit impractical even for a one-line user program.
Repro with a normally bootstrapped stage1 compiler:
fn main: print("ok")
with-stage1 analyze repro.w 'select:kind=body,name=match_' reports the in-unit regex body match_: 39,712 locals and 41,818 blocks. This is also present in the baseline stage1 compiler without the #1172 change. A baseline stage1 analysis of the 14-case temporary-exit fixture produces 644,908 facts; the bundled release compiler produces 15,344.
audit:all on stage1 spends minutes with 7–8 GB resident memory in mir_drop_state_compute_blocks. Native LLDB observes MirDropStateBlocks.load_block -> with_vec_push -> vec_grow -> rt_memcpy. The live row width is 43,194 keys. The exact allocation is mir_drop_state_blocks_new in src/MirCore.w: for _ in 0..bb_count * keys.len(): rows.push(MirDropState.Absent). MirDropStateBlocks.load_block then clones every key of a stored row for input joins and equality checks. The matrix alone exceeds 7 GB for this body.
Expected: full ownership validation remains usable on in-unit dependency bodies, without omitting checks or requiring opaque bundles to hide the large body. This needs a sparse/lazy state representation and/or a proven restriction of tracked places, with the same join and validation semantics. It is separate from #1172's early-return cleanup fix; the completed runtime matrix is clean, and its full audit is being repeated with the normal bundled stage2 compiler.
Evidence under out/with-get-investigation/: audit-stage1-minimal-body.log, return-temps-baseline-stage1-summary.log, return-temps-baseline-large-body.log, and return-temps-audit-progress-lldb.log. The two oversized stage1 audit processes were stopped deliberately; they are not passing evidence.
Reproduced again on 2026-09-21 while investigating #1216. This blocks the documented audit:all preflight even for a five-line formatting repro with no explicit imports.
At 3 minutes 2 seconds: approximately 99% CPU and RSS 7,486,096 KiB (about 7.1 GiB).
At 3 minutes 39 seconds: still running with RSS 7,486,048 KiB.
The redirected stdout/stderr log remained empty at those observations: no progress or verdict.
Attached LLDB, captured the stack below, detached, and later deliberately terminated the audit. It did not complete, and this is not a passing audit result.
This is additional evidence consistent with this issue's dense ownership-state computation. It establishes excessive time/memory use and an apparent hang to the caller, not a proven infinite loop. I did not identify the particular dependency body in this run.
Expected: the documented small-repro preflight should remain practical without disabling ownership validation. Progress identifying the current body and phase would also make a long-running audit distinguishable from a hang, but would not substitute for fixing the underlying computation.
Triage 2026-10-25, with v0.15.3.0 (main a261b65): does not reproduce as reported: a stage1 audit of a one-line program now finishes in 30 s at 650 MB, not the dense multi-GB matrix.
$ /usr/bin/time -l out/bootstrap/bin/with-stage1 analyze main.w audit:all # fn main: print("ok")
compiler-analysis-audit: facts=939942 violations=1 FAILED
30.36 real
649035776 maximum resident set size
Separate finding from the same run: that stage1 audit reports one violation in the in-unit pcre2 corpus: mode-provenance: sizeof/alignof type argument: Sema's type argument and the AST type node disagree in 4 of 466 decisions; first: match_ subject 411326: owner=llvm-kind-8 derived=none.
Activity
ehartford commentedon Sep 21, 2026
Reproduced again on 2026-09-21 while investigating #1216. This blocks the documented
audit:allpreflight even for a five-line formatting repro with no explicit imports.Environment and reproduction
6eb8ad6f75c74e47f3e63e275857456c5a8b39cc(PR codegen: formatting an Option[&T] no longer crashes the compiler #1216), using the pinned v0.15.2.0 seed and the normal:devtarget, at-O1.review_nested_ref.w:Observed
This is additional evidence consistent with this issue's dense ownership-state computation. It establishes excessive time/memory use and an apparent hang to the caller, not a proven infinite loop. I did not identify the particular dependency body in this run.
Expected: the documented small-repro preflight should remain practical without disabling ownership validation. Progress identifying the current body and phase would also make a long-running audit distinguishable from a hang, but would not substitute for fixing the underlying computation.
ehartford commentedon Oct 25, 2026
Triage 2026-10-25,
with v0.15.3.0(main a261b65): does not reproduce as reported: a stage1 audit of a one-line program now finishes in 30 s at 650 MB, not the dense multi-GB matrix.Separate finding from the same run: that stage1 audit reports one violation in the in-unit pcre2 corpus:
mode-provenance: sizeof/alignof type argument: Sema's type argument and the AST type node disagree in 4 of 466 decisions; first: match_ subject 411326: owner=llvm-kind-8 derived=none.ehartford commentedon Oct 25, 2026
Triage 2026-10-25: the separate finding noted above is filed as #2636.