Skip to content

fix: Windows cross-compilation — unsigned long vs size_t in polynomial_arithmetic.hpp#22073

Merged
nventuro merged 2 commits intov4-nextfrom
claudebox/fe9af88896e7e6d6-11
Mar 26, 2026
Merged

fix: Windows cross-compilation — unsigned long vs size_t in polynomial_arithmetic.hpp#22073
nventuro merged 2 commits intov4-nextfrom
claudebox/fe9af88896e7e6d6-11

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

Summary

Fixes Windows cross-compilation failure on v4-next. Replaces previous PR #22072 which merged without CI validation.

The header polynomial_arithmetic.hpp declares unsigned long num_coeffs but the implementation (.cpp) uses const size_t num_coeffs. On Linux these are the same type, but on Windows LLP64 unsigned long is 32-bit while size_t is 64-bit, causing -Wshorten-64-to-32 when passing domain.size (size_t).

This function was removed on next before Windows cross-compilation was added, so it was never caught there. It's v4-specific legacy code.

Also includes clang-format fix (the previous PR had format violations).

CI failure: https://github.com/AztecProtocol/aztec-packages/actions/runs/23608075427/job/68756199559

ClaudeBox log: https://claudebox.work/s/fe9af88896e7e6d6?run=11

… header

The implementation (.cpp) already uses size_t but the header declared
unsigned long. On Linux these are the same type, but on Windows LLP64
unsigned long is 32-bit while size_t is 64-bit, causing -Wshorten-64-to-32
when passing domain.size (size_t) to the parameter.

Also ran clang-format to fix alignment.
@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Mar 26, 2026
@ludamad ludamad changed the base branch from backport-to-v4-next-staging to v4-next March 26, 2026 18:06
@ludamad ludamad marked this pull request as ready for review March 26, 2026 18:06
Adds explicit flake pattern for this test which hit a flake during
ci-release-pr CI run on PR #22073.
@nventuro nventuro merged commit a4701a6 into v4-next Mar 26, 2026
7 checks passed
@nventuro nventuro deleted the claudebox/fe9af88896e7e6d6-11 branch March 26, 2026 19:16
@nventuro
Copy link
Copy Markdown
Contributor

Merging skipping CI - these are just clang formatting changes.

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

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants