Skip to content

Commit 86bdedf

Browse files
authored
Merge pull request #141 from osteele/fix-32bit-build
fix: handle 32-bit platform build for uint comparison
2 parents 756fcdd + 40a27d6 commit 86bdedf

3 files changed

Lines changed: 27 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,24 @@ jobs:
3535
- name: Test
3636
run: make test
3737

38+
build-32bit:
39+
runs-on: ubuntu-latest
40+
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v4
44+
45+
- name: Install Go
46+
uses: actions/setup-go@v5
47+
with:
48+
go-version: 1.26.x
49+
50+
- name: Build for 32-bit ARM
51+
run: GOOS=linux GOARCH=arm GOARM=7 go build ./...
52+
53+
- name: Build for 32-bit x86
54+
run: GOOS=linux GOARCH=386 go build ./...
55+
3856
vet:
3957
runs-on: ubuntu-latest
4058

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33

44
## Unreleased
55

6+
### Fixed
7+
8+
- **32-bit Platform Build**: Fixed build failure on 32-bit platforms (ARM, x86) where `math.MaxInt64` overflowed `uint` in the `isIntegerType` comparison. The `uint` value is now widened to `uint64` before comparing.
9+
10+
### CI
11+
12+
- Added 32-bit build verification (linux/arm, linux/386) to CI pipeline.
13+
614
## 1.8.1 (2026-02-27)
715

816
### Performance

filters/standard_filters.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ func isIntegerType(v any) bool {
3636
case int, int8, int16, int32, int64, uint8, uint16, uint32:
3737
return true
3838
case uint:
39-
// Check if uint value fits in int64 range
40-
return val <= math.MaxInt64
39+
return uint64(val) <= math.MaxInt64
4140
case uint64:
42-
// Check if uint64 value fits in int64 range
4341
return val <= math.MaxInt64
4442
default:
4543
return false

0 commit comments

Comments
 (0)