Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overflows int errors on 32bit ARM build after v1.2.2-dev.79 #2870

Closed
novuscy opened this issue Nov 5, 2020 · 1 comment · Fixed by #2872
Closed

Overflows int errors on 32bit ARM build after v1.2.2-dev.79 #2870

novuscy opened this issue Nov 5, 2020 · 1 comment · Fixed by #2872
Assignees
Labels
3-high priority denoting release-blocking issues bug Something isn't working hanoi Hanoi release

Comments

@novuscy
Copy link

novuscy commented Nov 5, 2020

🐞 Bug Report

I tried to build the master branch on a 32bit ARM system, but I got errors about int overflows...

It was OK before v1.2.2-dev78 tag, it might be something wrong with the V2 implementations?

Affected Services

The issue is located in:

Core services

Is this a regression?

Yes, build completes on v1.2.2-dev.78 and before

Description and Minimal Reproduction

make a 32bit ARM build after v1.2.2-dev.79

🔥 Exception or Error




# github.com/edgexfoundry/edgex-go/internal/core/metadata/v2/controller/http
internal/core/metadata/v2/controller/http/device.go:170:73: constant 4294967295 overflows int
internal/core/metadata/v2/controller/http/device.go:313:78: constant 4294967295 overflows int
internal/core/metadata/v2/controller/http/deviceprofile.go:333:78: constant 4294967295 overflows int
internal/core/metadata/v2/controller/http/deviceservice.go:246:78: constant 4294967295 overflows int

🌍 Your Environment

Deployment Environment:
Raspberry Pi 4 Ubuntu 32bit
EdgeX Version: master

Anything else relevant?

@novuscy novuscy added the bug Something isn't working label Nov 5, 2020
@cloudxxx8 cloudxxx8 added 3-high priority denoting release-blocking issues hanoi Hanoi release labels Nov 5, 2020
@weichou1229
Copy link
Member

weichou1229 commented Nov 5, 2020

The error is cased by

offset, limit, labels, err := utils.ParseGetAllObjectsRequestQueryString(r, 0, math.MaxUint32, -1, config.Service.MaxResultCount)

Since 32 bits ARCH only support 2,147,483,647 as the maximum positive signed integer, will use math.MaxInt32 instead of the math.MaxUint32.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3-high priority denoting release-blocking issues bug Something isn't working hanoi Hanoi release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants