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

Limit session IDs to a non-negative, pseudo-random int32 #664

Merged

Conversation

mamachanko
Copy link
Contributor

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 #663

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>
Copy link
Member

@joaopapereira joaopapereira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am ok with the change. If we see any issue with this session ID in the future, we can always go for an Alphanumerical session ID, which will increase the number of possibilities again.

@joaopapereira joaopapereira merged commit f99dae6 into carvel-dev:develop May 14, 2024
8 checks passed
@mamachanko mamachanko deleted the topic/mamachanko/develop/386 branch May 14, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Cannot build for GOARCH=386
2 participants