I inspected the generated Windows link inputs and this does not look like a real bad object path in Triton; it matches a known Ninja-on-Windows/MSVC response-file parsing failure.
Findings
- Response file:
C:\triton\build\cmake.win-amd64-cpython-3.12\CMakeFiles\triton.rsp
- Ninja rule:
C:\triton\build\cmake.win-amd64-cpython-3.12\CMakeFiles\rules.ninja
- Link build edge:
C:\triton\build\cmake.win-amd64-cpython-3.12\build.ninja
Evidence
rules.ninja uses:
rspfile = $RSP_FILE
rspfile_content = $in_newline $LINK_PATH $LINK_LIBRARIES
- The actual response file is LF-only, not CRLF:
- size: 44705 bytes
- CRLF count: 0
- LF count: 270
- The last line of
triton.rsp is extremely long:
- line 271 length: 19189 chars
- That long line begins with the object that later “goes bad”:
CMakeFiles\triton.dir\python\src\specialize.cc.obj
- Ninja version in this build dir:
1.13.0.git.kitware.jobserver-pipe-1
(1) Likely root cause
The build is hitting the Windows/MSVC linker + Ninja 1.13.0 response-file bug: Ninja wrote an LF-only .rsp, and the final line is over 16 KB. link.exe then misparses the first token on that long line and drops a prefix from the first path, which is why it tries to open:
ton.dir\python\src\specialize.cc.obj
instead of the real path.
So the failure is not that Triton generated a truly bad object path; it is that link.exe is misreading a long LF-only response-file line produced by this Ninja version.
Why it surfaced “after GSan was disabled”:
- disabling GSan removed
gsan_testing.cc from the object list in C:\triton\CMakeLists.txt
- that changed which object became the first token on the giant final
.rsp line
- now the misparsed first token is
specialize.cc.obj
(2) Exact malformed entry if present
There is no malformed entry literally present in the generated files.
The actual entry in C:\triton\build\cmake.win-amd64-cpython-3.12\CMakeFiles\triton.rsp line 271 is:
CMakeFiles\triton.dir\python\src\specialize.cc.obj
The malformed path appears only after link.exe misparses that long LF-only line, effectively turning it into:
ton.dir\python\src\specialize.cc.obj
(3) Smallest plausible fix
Smallest/highest-confidence fix:
- on Windows, stop using Ninja 1.13.0 for this wheel build
- pin Ninja to 1.12.x or upgrade to a build that includes the Windows CRLF
.rsp fix
If you want the fix phrased operationally:
- “Use a Ninja version that writes CRLF response files on Windows.”
If you want the smallest repo-side workaround:
- none of the Triton-generated paths are wrong; the real fix is in the build toolchain, not Triton sources
- any workaround that only reorders objects would be fragile
Key file references
C:\triton\build\cmake.win-amd64-cpython-3.12\CMakeFiles\triton.rsp
C:\triton\build\cmake.win-amd64-cpython-3.12\CMakeFiles\rules.ninja
C:\triton\build\cmake.win-amd64-cpython-3.12\build.ninja
C:\triton\CMakeLists.txt
If you want, I can also summarize this as a short CI/root-cause note suitable for a PR or issue comment.