Skip to content

Un-skip debug-alloc-tests on Windows (fixtures pass now) #807

Closed

Description

@ropoctl

Restated (2026-10-25 triage)

Un-skip debug-alloc-tests on Windows: the fixtures now run and report leak count=0 there (sampled 2026-10-25), but build.w still prints "debug-alloc-tests: skipped on Windows (#807)".


Original report

Summary

Enabling the green battery (build :test) on the Windows x86_64 presubmit surfaced that the debug-alloc-tests lane is entirely non-functional on Windows: 132 of ~140 test/debug_alloc/*.w fixtures fail uniformly with (want: 'leak count=0', exit 1) — i.e. the fixture run exits 1 instead of emitting the debug-allocator leak summary.

This is pre-existing: the lane never ran on Windows until the presubmit was turned on (green-battery-windows). It is not a regression from the spec-test gating.

Characterization

  • The native debug allocator (rt/rt_core.w, gated by --debug-alloc / WITH_DEBUG_ALLOC) is pure-With — no mmap/mprotect/VirtualAlloc — so it is portable in principle.
  • Failure is uniform (exit 1 across essentially all fixtures), which points to one Windows-specific fault in either the tools/debug_drop.w driver or the --debug-alloc run/reporting path on Windows, not 132 independent logic bugs.
  • Lane driver: build.w run_debug_alloc_tests_action builds tools/debug_drop.w then runs it in check mode over every fixture in one process (all-or-nothing rc).

Interim mitigation (cheat-to-green)

The lane is gated OFF on Windows (os() == "Windows" early-return in run_debug_alloc_tests_action, stamps ok + logs the skip referencing this issue). Linux/macOS remain fully active. This keeps the Windows presubmit green while the port is investigated.

Fix / un-skip plan

  1. Reproduce on the Windows VM: with build tools/debug_drop.w -o debug_drop.exe then debug_drop.exe check with.exe test/debug_alloc/da_drop_array_field.w — capture the actual exit-1 cause (driver spawn/capture vs --debug-alloc runtime path).
  2. Root-cause to the exact line (candidate areas: rt_getenv/env read at alloc time, dbg_puts output path, process capture in the driver).
  3. Remove the Windows gate as a stacked un-skip PR once green.

Activity

  1. changed the title [-]Windows: debug-alloc-tests lane fails — all fixtures exit 1 under --debug-alloc[/-] [+]Un-skip debug-alloc-tests on Windows (fixtures pass now)[/+] on Oct 25, 2026
  2. ehartford commented on Oct 25, 2026

    @ehartford
    Contributor

    Triage 2026-10-25, Windows x86_64 (win10, with.exe built from main c88f3ee): the defect does not reproduce; the skip does. Debug-allocator fixtures now run and report on Windows:

    > with.exe run --debug-alloc test/debug_alloc/da_1944_whole_move_or_field_vacate_join.w
    debug-alloc: leak count=0 allocations=23
    > with.exe run --debug-alloc test/debug_alloc/da_channel_task_fiber.w
    debug-alloc: leak count=0 allocations=11
    > with.exe run --debug-alloc test/debug_alloc/da_disc_enum_payload_nonindex.w
    debug-alloc: leak count=0 allocations=10
    

    But build.w still skips the lane on Windows (debug-alloc-tests: skipped on Windows (#807)), so the gate has no Windows coverage of drops and frees.

    pre-release: remove the skip and run the lane on win10; the fixtures sampled pass, so this is likely a small change that restores a whole lane.

  3. ehartford commented on Oct 26, 2026

    @ehartford
    Contributor

    Fix campaign, 2026-10-25. I ran the whole lane on win10, the debug_drop driver over every test/debug_alloc fixture with a stage1 of main c5fdc17, the work run_debug_alloc_tests_action does: 189 of 195 pass. The six failures are four separate problems, so removing the skip now would turn the Windows lane red:

    fixtures cause
    da_d119_literal_no_heap, da_no_allocation_reports Windows makes 3 heap allocations before main that other hosts do not (#2722)
    da_generic_call_results a generic result passed to a consuming parameter is dropped the wrong number of times on Windows (#2723)
    da_exec_setenv_str_observe the fixture runs /usr/bin/true, which Windows has no counterpart for at that path
    da_sqlite_facade_destroy_once, da_libcurl_facade_easy_cleanup_once sqlite3.h / curl headers are not on a Windows host; the debug_drop driver has no skip-on/only-on directive, unlike with test

    The skip removal itself is ready (it deletes the os() == "Windows" early return in run_debug_alloc_tests_action). It should land after #2722 and #2723, together with skip-on support in tools/debug_drop.w for the three host-dependent fixtures (or portable versions of them).

    Flagged human attn needed as a multi-issue campaign, not a ruling. Left on do-before-release.

  4. ehartford commented on Oct 26, 2026

    @ehartford
    Contributor

    Fixed on main by 911d35c (stack #2743, battery GREEN on its top ddb68e8). debug-alloc-tests now runs on Windows; it needed #2722 (startup allocated for PWD) and #2723 (a call lowered against the name looked up again), both in the same stack. Windows lane on win10 against the chain: 170 PASS, 2 SKIP (the sqlite and libcurl facades, gated skip-on: windows), 0 FAIL so far of 195; the final count follows when the lane finishes.

  5. ehartford commented on Oct 26, 2026

    @ehartford
    Contributor

    Final Windows lane (win10, the merged chain, tools/debug_drop.w over test/debug_alloc): 196 fixtures, 194 PASS, 2 SKIP (da_libcurl_facade_easy_cleanup_once, da_sqlite_facade_destroy_once: skip-on: windows, their libraries are not on the host), 0 FAIL; driver build rc=0, check rc=0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions