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

Cast numbers in "uint oob" test error messages to avoid overflows #514

Merged
merged 1 commit into from
Jun 27, 2024

Commits on Jun 1, 2024

  1. Cast numbers in "uint oob" test error messages to avoid overflows

    For "uint oob" tests in TestAsInt32 and TestAsFloat64 in
    encoding/cbor/coerce_test.go, cast the number to Uint in the error
    message just as the number is cast in the test itself, so
    as to avoid overflows when tested on 32-bit architectures.
    
    Fixes "cannot use maxv + 1 (untyped int constant 2147483648)
    as int value in argument to fmt.Sprintf (overflows)" in TestAsInt32
    and "cannot use maxv + 1 (untyped int constant 18014398509481985)
    as int value in argument to fmt.Sprintf (overflows)" in TestAsFloat64
    
    Detected by Debian CI running on 386; see
    https://ci.debian.net/packages/g/golang-github-aws-smithy-go/testing/i386/47149094/#L1260
    anthonyfok committed Jun 1, 2024
    Configuration menu
    Copy the full SHA
    4fd00cb View commit details
    Browse the repository at this point in the history