maxChunk overflows int when try to build to 32-bit device #90

Closed
opened 2024-12-30 04:26:02 +00:00 by guo1017138 · 4 comments
guo1017138 commented 2024-12-30 04:26:02 +00:00 (Migrated from github.com)

Bug report:

maxChunk contant equals to 4294967295 seems not working when try to compile with GOARCH=arm, which means armhf, 32 bit procesor.

$ CGO_ENABLED=0 GOARCH=arm GOOS=linux GOARM=7 go build -v 
main.version=24.12.0 -X main.buildDate=2024-12-30T12:21:24+08:00" -o datacollector.armhf
github.com/nemith/netconf/transport
# github.com/nemith/netconf/transport
../../../go/pkg/mod/github.com/nemith/netconf@v0.0.2/transport/frame.go:206:18: maxChunk (untyped int constant 4294967295) overflows int
make: *** [Makefile:19: build-armhf] Error 1```

Bug report: maxChunk contant equals to 4294967295 seems not working when try to compile with GOARCH=arm, which means armhf, 32 bit procesor. ```shell $ CGO_ENABLED=0 GOARCH=arm GOOS=linux GOARM=7 go build -v main.version=24.12.0 -X main.buildDate=2024-12-30T12:21:24+08:00" -o datacollector.armhf github.com/nemith/netconf/transport # github.com/nemith/netconf/transport ../../../go/pkg/mod/github.com/nemith/netconf@v0.0.2/transport/frame.go:206:18: maxChunk (untyped int constant 4294967295) overflows int make: *** [Makefile:19: build-armhf] Error 1```
nemith commented 2024-12-30 13:03:58 +00:00 (Migrated from github.com)

Thanks for reporting this. Should be a quick fix (move from an int to a uint32).

I have spotty internet today and could be that way until Thursday. If you want to do a PR I can approve , if not that is ok as well and I will get to it on Thursday

Thanks for reporting this. Should be a quick fix (move from an int to a uint32). I have spotty internet today and could be that way until Thursday. If you want to do a PR I can approve , if not that is ok as well and I will get to it on Thursday
guo1017138 commented 2024-12-31 01:30:41 +00:00 (Migrated from github.com)

Thanks for quick response. There will be many codes/variables impacted if this type get changed. So for the perfect solution, I'll wait your fix. No emergency and take your time.

BTW, I am wondering if you have plan to implement Get Method since I can see there is only GetConfig method for reading by current.

Thanks for quick response. There will be many codes/variables impacted if this type get changed. So for the perfect solution, I'll wait your fix. No emergency and take your time. BTW, I am wondering if you have plan to implement Get Method since I can see there is only GetConfig method for reading by current.
nemith commented 2025-01-02 15:23:20 +00:00 (Migrated from github.com)

I don't remember why i didn't include Get. Maybe cause it's just a wrapper around any serializable object. But that doesn't meant we shouldn't have it to include all methods defined in the RFC

Can you open another ticket on implementing it?

I don't remember why i didn't include `Get`. Maybe cause it's just a wrapper around any serializable object. But that doesn't meant we shouldn't have it to include all methods defined in the RFC Can you open another ticket on implementing it?
guo1017138 commented 2025-01-03 00:51:50 +00:00 (Migrated from github.com)

Yeah, sure. I will open one for it. Thanks.

Yeah, sure. I will open one for it. Thanks.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nemith/netconf#90
No description provided.