Repository navigation
Conversation
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.
…time-domain-audit)
ehartford
marked this pull request as ready for review
November 11, 2026 19:48
This was referenced Nov 11, 2026
This was referenced Nov 14, 2026
This was referenced Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
with migraterefusesfma,frexp,ldexp,isnanand other C99<math.h>functions #2680: std.libc binds the C99 math functions outside the builtins (fma, fmin/fmax/fdim, frexp, ldexp, modf, scalbn, nextafter, remainder, logb/ilogb, the rounding family, each with its f form); the classification macros lower to four std.libc functions whatever the host header expands them to. Windows'_dclassspellings are not mapped yet.pub extern fnfor libm names that are now compiler builtins #1153: the migrator's preamble declares no extern for a math builtin. Promoted corpora keep theirs until their next promotion (D112).let), or the line that rebinds it.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.