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
Windows: three heap allocations before main that other hosts don't make (debug-alloc counts differ) #2722
On Windows x86_64 every program makes three heap allocations at startup that macOS and Linux do not. That breaks the debug-allocator fixtures that pin a program's allocation count:
--trace-alloc on win10 (stage1 of main c5fdc17) for da_d119_literal_no_heap.w:
ALLOC 24 2040090329104 0 <- startup, Windows only
ALLOC 8 2040090329152 1 <- startup, Windows only (origin token 1)
ALLOC 48 2040090329184 1 <- startup, Windows only (origin token 1)
ALLOC 24 2040090329104 0 the program's three, as on macOS
ALLOC 64 2040090329184 0
ALLOC 7 2040090329152 0
debug-alloc: leak count=0 allocations=6
macOS and Linux (eric-5090) print allocations=3 for the same program. The wide argv conversion uses rt_mmap, so it is not one of them. Root cause still to find: the three allocations come from the Windows runtime or std startup path before main.
Expected: a program that allocates nothing reports allocations=0 on every host; or, if Windows startup needs heap, it allocates outside the counted heap, as argv does.
Found while removing the debug-alloc lane's Windows skip (#807): 189 of 195 fixtures pass on Windows.
Activity
Runtime (Windows): startup sets PWD without allocating, so a program …
build: debug-alloc-tests runs on Windows, and its driver reads the pl…
ehartford commentedon Oct 26, 2026
Fixed on main by 0c16fb6 (stack #2743, battery GREEN on its top ddb68e8: behavior-tests 1949/1949, gate, uat and battery-checks green).