Skip to content

Issues batch G: #2680 #1153 #2369 #2761 #1014 - #3257

Merged
ehartford merged 9 commits into
mainfrom
issues-g
Nov 11, 2026
Merged

ehartford merged 9 commits into
mainfrom
issues-g

Conversation

@ehartford

@ehartford ehartford commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Battery: GREEN on the stack top 2b8ba4d (seed-driven, with uat --strict, display scenarios run). Two earlier batteries on this stack were red on defects in this PR (capture crash on fiber and generator stacks, the libc surface table, a test expectation, three missing runtime domain rows); each is fixed here.

Eric Hartford added 9 commits November 11, 2026 08:27
… declares no extern for a math builtin

#2680. std.libc binds the C99 <math.h> functions outside the §17.6a
builtins (fma, fmin, fmax, fdim, frexp, ldexp, modf, scalbn, nextafter,
remainder, logb, ilogb, the rounding family, each with its f form), and the
migrator's system-symbol filter admits them. The classification macros
(isnan, isinf, isfinite, signbit) lower to four std.libc functions whatever
the host header expands them to: Darwin's __inline_<m>{f,d,l}, clang and
glibc's __builtin_<m>, older glibc's __<m>.

#1153. The migrator's preamble no longer declares extern fn for the 17
names that are compiler builtins (D42); a migrated call of one is the
builtin. Promoted corpora keep their lines until their next promotion
(D112).

Test: c-migrator-basic-tests gains c99_math, which migrates and runs a C
program using every function. Before: 'unsupported filtered system variable
fma'.
…es the fix

Sema records the first site that rebinds a mutable global whole
(global_rebind_sites; a write into it is not a rebinding, §9.1c). When no
body rebinds the global the refusal says to spell it `let` and prints the
declaration; when one does, it names that site and says `let` is not
available. The emitter still never changes the spelling itself.

Tests: bundle-interface-tests gains wi_refuse_var_droppable and
wi_refuse_var_rebound. Applying the suggested fix to the first builds.
…it builds

comp_resolve_seed_compiler read WITH and PATH with a bare env(), so nothing
in a target's record said which compiler had made it. The producer record
(out/bootstrap-lib/.producer) holds no compiler dep at all, so a build store
entry made by a `with` found on PATH verified for a run whose WITH named
the pinned seed, and the runner then found no runtime of the driver's
generation. The reads now go through ctx.env_input, and the record carries
env:WITH (and env:PATH when WITH is unset).

Evidence: bootstrap-runtime-producer.state gains the env:WITH line; before,
it had neither an env nor a dep line for the compiler.
…llocation site

The ledger entry keeps two calling chains: the allocation's (6 frames) and
the first free's (8). A DOUBLE FREE report prints the first free's chain and
then the second's; the first 16 LEAK lines each print where the block was
allocated. Frames come from the platform's in-process unwinder
(rt_backtrace_capture / rt_backtrace_print_frames): Darwin's backtrace();
the other backends capture nothing yet and print the tags as before.

The report runs under the allocator lock, so it prints the second chain
through the capture path: rt_backtrace_print frees a str and deadlocked
there (sample: with_str_free_drop_origin spinning under
dbg_report_double_free).

Cost: 2,000,000 alloc/free pairs under WITH_DEBUG_ALLOC go from 0.09 s to
0.19 s.

Tests: da_1014_double_free_names_first_site, da_1014_leak_names_alloc_site
(only-on darwin; both fail on the previous compiler). Tool docs updated
(delegated, D98: tool output, not language).
…the c99_math case expects the migrator's own spelling
…ace table names the C99 math functions; the bundle refusal case expects its own fixture's global

The first battery on this stack was red on these:
- debug-alloc-tests, drop-audit (async cells), behav_return_temporary_cleanup:
  exit 139. backtrace() on a fiber's stack walks past where the fiber began.
  dbg_backtrace captures nothing when with_fiber_in_fiber().
- libc-surface-check: its table of C-standard names lacked the 28 math
  functions #2680 binds.
- bundle-interface-tests: the expectation named NAMES: List[str]; the
  fixture's global is TABLE: List[i32].
A pull generator runs on its own stack and is not a fiber
(da_gen_pull_drop_stops_generator still exited 139). The condition is the
stack, so the platform's capture checks it: Darwin compares the current
frame with the thread's stack bounds and captures nothing outside them.
@ehartford
ehartford added this pull request to stack #3259 November 11, 2026 19:48
@ehartford ehartford changed the title issues g Issues batch G: #2680 #1153 #2369 #2761 #1014 Nov 11, 2026
@ehartford
ehartford marked this pull request as ready for review November 11, 2026 19:48
@ehartford
ehartford merged commit 2fc08bf into main Nov 11, 2026
@ehartford
ehartford deleted the issues-g branch November 11, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant