Skip to content

[python] Test: disable incremental linking for Windows AOT runtime test modules - #9415

Draft
alexreinking wants to merge 1 commit into
mainfrom
alexreinking/windows-runtime-module-incremental-link-test
Draft

[python] Test: disable incremental linking for Windows AOT runtime test modules#9415
alexreinking wants to merge 1 commit into
mainfrom
alexreinking/windows-runtime-module-incremental-link-test

Conversation

@alexreinking

Copy link
Copy Markdown
Member

Summary

This is a test, not a confirmed fix. Opening as draft to see whether it actually resolves the flake before merging.

Our Windows CI buildbots have been intermittently failing python_bindings/halide-runtime/test/CMakeLists.txt's runtimeadd.dll link with:

runtimeadd_aot.lib(runtimeadd_aot.obj) : fatal error LNK1236: corrupt or invalid COFF sections

This always occurs on the last target reconfigure in the CI matrix (x86-64-windowsx86-64-windows-sse41), always on the runtimeadd module specifically (never callconv/callconv_xor, which are built the same way), and so far only on one of our two Windows workers. The CI recipe reconfigures and rebuilds the same build tree in place for ~9 different Halide_TARGETs, so this module gets relinked with /INCREMENTAL against a changed /WHOLEARCHIVE static library many times per job — a pattern with a documented history of tripping MSVC's incremental linker.

This PR disables incremental linking for these MSVC module targets. They're one-shot build artifacts (loaded by a Python test, never iterated on interactively), so incremental linking buys nothing.

Since this flake is intermittent and worker-specific, we don't yet know if this is the actual root cause or just a plausible contributor — keeping this as a draft until we've seen enough CI runs to tell.

Test plan

  • Watch several CI runs on the Windows builders and confirm LNK1236 no longer occurs on the previously-affected worker.
  • If it recurs, investigate other causes (e.g. environment differences between the two Windows workers) before merging.

…ules

The runtime module test targets link a Halide-generated AOT static
library into a DLL with /WHOLEARCHIVE. On the Windows CI matrix, which
reconfigures and rebuilds the same tree for many Halide_TARGETs in a
row, this has intermittently failed with LNK1236 ("corrupt or invalid
COFF sections") when relinking against a changed archive. These
modules are one-shot build artifacts, so incremental linking has
nothing to offer and is a plausible source of the corruption.
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.17%. Comparing base (866fe46) to head (f4db9ea).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9415      +/-   ##
==========================================
+ Coverage   70.00%   70.17%   +0.16%     
==========================================
  Files         261      261              
  Lines       79402    79402              
  Branches    19360    19360              
==========================================
+ Hits        55586    55719     +133     
+ Misses      17941    17889      -52     
+ Partials     5875     5794      -81     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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