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
extern fn with_fs_read_file segfaults in user programs (D30-transitional seam) — std.fs works; CLAUDE.md still recommends the broken idiom #901
Repro (rc=139, no output, both fn-main and implicit-main)
use std.builtins.print_i64
extern fn with_fs_read_file(path: str) -> str
fn main:
let text = with_fs_read_file("tiny.txt")
print_i64(text.len())
with run repro.w → exit 139 (SIGSEGV) before any output. File size is
irrelevant (2-line file). The identical program via the sanctioned route
works:
use std.fs
use std.builtins.print_i64
fn main:
let text = read_file("tiny.txt")
print_i64(text.len())
Pre-existing
Reproduces identically on the published with-darwin-aarch64 release
binary — not introduced by the 2026-08-30 reseeds. Likely the #747 str
flip changed str ownership across the extern boundary (the D30 notes
already say post-retirement str in an extern signature is a §16.3e
error; this seam appears to be broken ahead of its formal retirement).
Collateral
CLAUDE.md's tooling section still tells agents to reach the filesystem
via extern fn with_fs_read_file(path: str) -> str / with_fs_write_file — following the docs produces a segfaulting
program. Until the D30 retirement lands, either fix the seam or update
CLAUDE.md to point at std.fs (read_file/write_file) now.
CLAUDE.md no longer recommends the broken idiom — the tooling guidance now points at std.fs (read_file/write_file/list_files) with an explicit 'never declare the with_fs_* externs' warning and the #909 caveat. The seam defect itself needs no standalone fix: the with_fs_* internal ABI is scheduled to die entirely with the D30 retirement (#761) — fixing a seam that is being removed is work against the grain. Folding the remaining defect into #761; if D30 slips far enough that the seam's lifetime matters, reopen.
Activity
ehartford commentedon Aug 31, 2026
CLAUDE.md no longer recommends the broken idiom — the tooling guidance now points at std.fs (read_file/write_file/list_files) with an explicit 'never declare the with_fs_* externs' warning and the #909 caveat. The seam defect itself needs no standalone fix: the with_fs_* internal ABI is scheduled to die entirely with the D30 retirement (#761) — fixing a seam that is being removed is work against the grain. Folding the remaining defect into #761; if D30 slips far enough that the seam's lifetime matters, reopen.
CLAUDE.md: tools use std.fs, never the with_fs_* extern seam (#901)
test: the D acceptance corpus runs as the std fallback tier will reso…
test: the D acceptance corpus runs as the std fallback tier will reso…
test: the D acceptance corpus runs as the std fallback tier will reso…
Build store, runner, corpora, deps discovery, generic-instance identi…