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

Cannot build for GOARCH=386 #663

Closed
mamachanko opened this issue May 14, 2024 · 0 comments · Fixed by #664
Closed

Cannot build for GOARCH=386 #663

mamachanko opened this issue May 14, 2024 · 0 comments · Fixed by #664
Labels
bug This issue describes a defect or unexpected behavior

Comments

@mamachanko
Copy link
Contributor

What steps did you take:

Build for, say, windows/386:

GOOS=windows GOARCH=386 go build ./...

What happened:

Int overflow. 🤖 💀

# carvel.dev/imgpkg/pkg/imgpkg/registry
pkg/imgpkg/registry/registry.go:202:36: cannot use 9999999999 (untyped int constant) as int value in argument to rand.Intn (overflows)

What did you expect:

It builds w/o problems.

Anything else you would like to add:

imgpkg is not distributed for */386. That's not something we need to change. However, since carvel.dev/imgpkg can be consumed as a library, it should be compatible.

Environment:

  • imgpkg version (use imgpkg --version): n/a
  • Docker registry used (e.g. Docker HUB): n/a
  • OS: windows/386

Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

@mamachanko mamachanko added bug This issue describes a defect or unexpected behavior carvel triage This issue has not yet been reviewed for validity labels May 14, 2024
mamachanko added a commit to mamachanko/imgpkg that referenced this issue May 14, 2024
Technically, this reduces the set from which session IDs are drawn by
(9.999.999.999 - 2.147.483.647) = 7.852.516.352, say 75%.

Practically, ~2 million should large enough to avoid collisions in the
real-world.

This fixes an int overflow for 386 architectures.

Fixes carvel-dev#663

Signed-off-by: Max Brauer <mbrauer@vmware.com>
mamachanko added a commit to mamachanko/imgpkg that referenced this issue May 14, 2024
Technically, this reduces the set from which session IDs are drawn by
(9.999.999.999 - 2.147.483.647) = 7.852.516.352, say 75%.

Practically, ~2e10 possible session IDs should be large enough to avoid
collisions in the real-world.

This fixes an int overflow for 386 architectures.

Fixes carvel-dev#663

Signed-off-by: Max Brauer <mbrauer@vmware.com>
@github-actions github-actions bot removed the carvel triage This issue has not yet been reviewed for validity label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes a defect or unexpected behavior
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant