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

fix uint testing data overflow bug #2026

Merged
merged 3 commits into from
Feb 20, 2023
Merged

fix uint testing data overflow bug #2026

merged 3 commits into from
Feb 20, 2023

Conversation

wty-Bryant
Copy link
Contributor

@wty-Bryant wty-Bryant commented Feb 15, 2023

fix #1998 int overflow on 32bit architectures

@wty-Bryant wty-Bryant requested a review from a team as a code owner February 15, 2023 21:42
Copy link
Contributor

@aajtodd aajtodd left a comment

Choose a reason for hiding this comment

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

There are failing tests that need addressed, see my comment. Also missing changelog entry.

@@ -38,7 +38,7 @@ func TestExponentialJitterBackoff_AttemptDelay(t *testing.T) {
"max delay": {
MaxBackoff: 20 * time.Second,
RandFloat: func() (float64, error) { return maxB, nil },
Attempt: 1 << 53,
Attempt: math.MaxInt,
Copy link
Contributor

Choose a reason for hiding this comment

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

fix:

math.MaxInt was only added in Go 1.17. Probably just change this to int64 type explicitly or change the value to be within range

@wty-Bryant wty-Bryant linked an issue Feb 16, 2023 that may be closed by this pull request
@wty-Bryant wty-Bryant merged commit 8e6fa27 into main Feb 20, 2023
@lucix-aws lucix-aws deleted the firstissue branch May 6, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests fail on 32-bit due to untyped integer overflows
2 participants