Skip to content

fix: handle 32-bit platform build for uint comparison#141

Open
osteele wants to merge 1 commit intomainfrom
fix-32bit-build
Open

fix: handle 32-bit platform build for uint comparison#141
osteele wants to merge 1 commit intomainfrom
fix-32bit-build

Conversation

@osteele
Copy link
Owner

@osteele osteele commented Feb 27, 2026

Summary

  • Fix build failure on 32-bit platforms (ARM, x86) where math.MaxInt64 overflows uint
  • Widen uint to uint64 before comparing to math.MaxInt64 in isIntegerType
  • Add CI jobs for 32-bit cross-compilation (linux/arm, linux/386)

Fixes #49

Test plan

  • CI passes on all existing platforms
  • New build-32bit CI job passes (linux/arm, linux/386)
  • Existing tests still pass

On 32-bit platforms (ARM, x86), `uint` is 32 bits, so comparing
a `uint` value directly to `math.MaxInt64` causes a compile error
since the constant overflows. Widen `uint` to `uint64` before the
comparison.

Also add CI jobs for 32-bit cross-compilation (linux/arm, linux/386).
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.

Add 32-bit platform to CI

1 participant