Repository navigation
Commit dc1a1a7
committed
fix(extractor): drop unsound pool guard-transfer; keep cross-member return only (Codex)
Codex P2: treating a rented field passed to ANY field-stored `new X(field)` as released
wrongly suppresses a real leak for NON-owning wrappers (`_view = new ReadOnlyMemory<byte>(_buf)`
and other cached views), where the array is never returned. Soundly distinguishing an owning
guard (that Returns the buffer) from a non-owning view is not worth it for the single
SharedArrayPoolBuffer FP, so the guard-transfer is removed entirely.
Fix #3 keeps only the sound, high-value part: a pooled FIELD is released if `pool.Return(field)`
appears anywhere in the class (cross-member ctor-rent + Dispose-return — BufferedReadStream).
SharedArrayPoolBuffer's indirect release via its LifetimeGuard is left as an honest known
limitation. Sample/CI drop the PoolFieldTransferredToGuard case accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rg8kSk1YT14x7A1vo5zgED1 parent cec7c7e commit dc1a1a7
3 files changed
Lines changed: 12 additions & 56 deletions
File tree
- .github/workflows
- frontend/roslyn
- OwnSharp.Extractor
- samples
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2366 | 2366 | | |
2367 | 2367 | | |
2368 | 2368 | | |
2369 | | - | |
2370 | | - | |
2371 | | - | |
2372 | | - | |
2373 | | - | |
2374 | | - | |
2375 | | - | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
2376 | 2376 | | |
2377 | 2377 | | |
2378 | 2378 | | |
2379 | 2379 | | |
2380 | 2380 | | |
2381 | 2381 | | |
2382 | 2382 | | |
2383 | | - | |
2384 | | - | |
2385 | | - | |
2386 | | - | |
2387 | | - | |
2388 | | - | |
2389 | | - | |
2390 | | - | |
2391 | | - | |
2392 | | - | |
2393 | | - | |
2394 | | - | |
2395 | | - | |
2396 | | - | |
2397 | | - | |
2398 | | - | |
2399 | | - | |
2400 | 2383 | | |
2401 | 2384 | | |
2402 | 2385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 40 | + | |
68 | 41 | | |
69 | 42 | | |
70 | 43 | | |
| |||
0 commit comments