xcrdapi: build the read test again under MSVC /W4 /WX #400
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/400"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from brcly/TuxBox. Originally posted by KainanP on 2026-11-28T14:36:13Z.
On Windows with MSVC (VS 2022 Build Tools 14.44,
vcvars64),python build.py allon main stops at the xcrdapi read test:The page-array and cancellation blocks from
6e994abreusecountandsizefrom the enclosing scope, and the cancellation block pushessize_tlengths into a byte vector. clang-cl doesn't warn on these, so the Linux build didn't catch it.The fix renames the inner locals (
pages,total) and narrows the stored-block length on purpose. The length is at most 65535, so it's held asUINT16, and its bytes and the bytes of its one's complement come from that value. The bytes the test writes don't change. No warning is suppressed.Checked on Windows 11 with MSVC 14.44:
build.py allpasses withCARGO_BUILD_JOBS=4.tuxbox.py verify --only xcrdapi --backend nativepasses (raw=16 zlib=16 guards=2 errors=2 cancellation=2 bc1=4 bc7=2 pages=2 autosubmit=64 PASS).AI use: Claude Code reproduced the failure, wrote the change and ran the build and check above; KainanP published it.
🤖 Generated with Claude Code