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
Concurrent with run in one directory: link fails with undefined rt_*/with_* symbols (shared out/tmp/with_runtime/*.o rewritten mid-link) #1374
Found while sweeping for #1362 (eight with run processes in one directory). Reproduces on the installed compiler (v0.15.2.1-g478b26481) and on the #1364 branch's stage2.
Concurrent with run of any program from one working directory fails to link in most of the processes:
mkdir race && cd race
printf 'use std.process\nfn main:\n let argv: Vec[str] = Vec.new()\n argv.push("/usr/bin/true")\n print(f"{run(&argv)}")\n' > pr2.w
for i in 1 2 3 4 5 6; do (with run pr2.w > r$i.log 2>&1 &); done
5 of 6 logs:
Undefined symbols for architecture arm64:
"_rt_fiber_fault_addr", referenced from:
_with_fiber_stack_overflow_handler in fiber.o
...
"_with_vec_push", referenced from:
___with_main in pr2.o
ld: symbol(s) not found for architecture arm64
Every process materializes the embedded runtime objects to the same paths, out/tmp/with_runtime/{rt_core,fiber,fiber_runtime,...}.o, and links them; the undefined set (every rt_* and with_* symbol) is consistent with one process linking an rt_core.o another process is rewriting — a hypothesis, not yet observed at the write site. A single with run links fine.
Expected: concurrent runs never observe a partially written runtime object (write to a unique temp name and rename into place, or a per-process directory; D30's (compiler-version, target)-keyed cache has the same requirement).
Activity
Sema/Frontend: bundle internals need a `use` (§18.2); a bundle interf…
Sema/Frontend: bundle internals need a `use` (§18.2); a bundle interf…
Sema/Frontend: bundle internals need a `use` (§18.2); a bundle interf…
Sema/Frontend: engine corpora never ambient (§18.2); bundle interface…
with run: each invocation builds in a directory of its own (#1374) (#…
run: a run's build directory is the system's scratch (#2829)