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
build runner links a tree-generation out/lib when prepare-bootstrap-link-root was fresh: seed-compiled runner segfaults (mixed-world, #761/#1797 class) #1906
Found while measuring battery lanes on branch battery-speed (worktree based on f589bf7, driver = pinned seed nightly-20260927-local-1).
Repro
In a worktree, src/main build (full chain; stage objects populate out/lib with the tree generation's runtime, .producer = the tree's hash).
Edit any build/*.w or src/*.w so the runner key changes and the stage chain rebuilds out/lib.
src/main build :tools-tests (not --no-deps).
Actual: [build] runner compiled 25.0s, then error: build.w target 'build' failed with exit code 139. Under lldb the runner (out/.build-state/build-runner, WITH_BUILD_ACTION_NAME=build) dies in rt_memcpy <- posix_str_to_c_buf(s=(ptr=" a/", len=4298598592)) <- rt_compat_setenv_str <- set_env at __with_build_runner.w:10 — the set_env("WITH_BUILD_TOOLFS_SUPPRESS", "") after build(ctx): a str argument crossing into runtime code with the wrong layout. Same crash with the original build/*.w restored; SIGBUS instead of SIGSEGV when unrelated files under out/ change (data-dependent corruption).
Cause (by elimination): the runner is compiled with WITH_OUT_DIR=<root>/out (src/main.w build_runner_ensure), so the link takes whichever runtime directory the probe finds. bootstrap_ready in the scheduler is true when prepare-bootstrap-link-root is fresh in this run, but freshness of that target says nothing about out/lib: the stage chain re-created out/lib/cimport_stubs.o (the probe) after prepare last ran, so the seed-compiled runner linked the tree generation's runtime objects. build_runner_runtime_dirs_are_this_generation would have refused, but it is only consulted when the prepare target is not scheduled.
Workaround used: rm out/bootstrap-lib/.prepared-link-root out/.build-state/build-runner.key so prepare re-executes (removing the probe) before the runner compiles. The runner then works.
Expected: the runner never links a runtime directory of another generation (D30: that link must be refused, not attempted). Either always check build_runner_runtime_dirs_are_this_generation before compiling the runner, or pass the runner link an explicit bootstrap link root instead of WITH_OUT_DIR probing. And the link itself is a silent mixed-world link, so the tool that should have refused it (the D30 producer check at link time) stayed silent — that check needs to cover the runner link too.
Activity
Build: the action runner links against a runtime root the driver name…
Build: `--no-deps` runs an action in the native runner when a link ro…
Build: the action runner links against a runtime root the driver name…
Build: `--no-deps` runs an action in the native runner when a link ro…
Build: the action runner links against a runtime root the driver name…
Build: `--no-deps` runs an action in the native runner when a link ro…
Build store, runner, corpora, deps discovery, generic-instance identi…
ehartford commentedon Oct 3, 2026
Fixed on main in 6572eab (PR #2008; seed-driven battery GREEN on e0f5510, tree identical to main).
#2024: pipeline stage calls get the callee's default arguments; #2026:…