Visitar URL original
Go: fix FP in incorrect integer conversion query relating to strict comparisons with MaxInt and MaxUint by owen-mc · Pull Request #15128 · github/codeql · GitHub
The Wayback Machine - https://web.archive.org/web/20240103183722/https://github.com/github/codeql/pull/15128
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

Go: fix FP in incorrect integer conversion query relating to strict comparisons with MaxInt and MaxUint #15128

Merged

Conversation

owen-mc
Copy link
Contributor

@owen-mc owen-mc commented Dec 17, 2023

The new logic for comparing with MaxInt and MaxUint had a logic error which affected strict inequailities. So x <= MaxUint would work but x < MaxUint wouldn't.

The cause of the test failure is confusion about
whether the architecture is 32 bit or 64 bit.
It was wrong for strictnessOffset = 1 before.
@owen-mc owen-mc requested a review from a team as a code owner December 17, 2023 06:19
@github-actions github-actions bot added the Go label Dec 17, 2023
@owen-mc owen-mc force-pushed the go/fix-fp-incorrect-integer-conversion-signedness branch from 454ba3a to 5a2c48f Compare December 17, 2023 06:28
@owen-mc owen-mc merged commit 14cffc3 into github:main Jan 3, 2024
14 checks passed
@owen-mc owen-mc deleted the go/fix-fp-incorrect-integer-conversion-signedness branch January 3, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants