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
Commit 05ad3e3
Browse filesBrowse the repository at this point in the historyBrowse files
Two follow-ups after PR #71's first CI run:
1. Metamorphic selftest (the failing job): the alpha-rename / reorder transforms in
scripts/metamorphic.py did not know the new `overspan` statement, so renaming `buf`
left `overspan buf` referencing the vanished name (OWN025 -> OWN030, non-invariant).
Teach _sub_stmt / _all_names / _touches that `overspan` reads its var, exactly like
`use`/`release`. Selftest back to 8/8.
2. Codex review (Program.cs): a full view written as a local-declaration initializer
(`var copy = buf.AsSpan().ToArray();`) was missed — LowerFlowStmt's
LocalDeclarationStatementSyntax branch never calls EmitFlowExpr on a non-acquire
initializer. Refactor the overspan scan into a shared EmitOverspans helper and call
it from the local-decl branch too, so the over-copy initializer AND a view-local
declaration (`Span<T> s = buf.AsSpan();`) are both caught. The corpus before.cs now
exercises both spellings; after.cs bounds both.
Spec / notes / P-007 updated for expression + initializer coverage (only the
`Array.Clear(buf, 0, buf.Length)` spelling remains a follow-up). The corpus benchmark
already validated recall 14 (before.cs -> OWN025) on the prior run.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rg8kSk1YT14x7A1vo5zgED
OWN003 double-release, OWN008 release-while-borrowed), the buffer/borrow model
18
19
in `spec/`, [P-001](P-001-csharp-extractor.md). See
@@ -44,7 +45,7 @@ The corpus already pins two real cases (`corpus/real-world/arraypool-double-retu
44
45
|**POOL002** view after return | a `Span`/`Memory` view used after the owner is `Return`ed |`OWN002`|
45
46
|**POOL003** double return |`Return` reachable twice for the same buffer |`OWN003`|
46
47
|**POOL004** view escapes | a borrowed `Span` returned/stored beyond the owner's lifetime |`OWN004`/`OWN008`|
47
-
|**POOL005** clear/copy past length | a full-length view (`buf.AsSpan()`, no bound) reads/copies beyond the logical length of the rented region |`OWN025``[resource: pooled buffer]` ✅ (view in an expression; view-local /`Array.Clear` next) |
48
+
|**POOL005** clear/copy past length | a full-length view (`buf.AsSpan()`, no bound) reads/copies beyond the logical length of the rented region |`OWN025``[resource: pooled buffer]` ✅ (view in an expression or initializer;`Array.Clear(buf, 0, buf.Length)` next) |
0 commit comments