Skip to content

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