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

Wrong arithmetic comparison with wasm #6991

Closed
Ptroger opened this issue Sep 5, 2024 · 0 comments
Closed

Wrong arithmetic comparison with wasm #6991

Ptroger opened this issue Sep 5, 2024 · 0 comments
Labels

Comments

@Ptroger
Copy link
Contributor

Ptroger commented Sep 5, 2024

run ./opa_darwin_arm64 eval 'x := 9223372036854775807; y := 1; x > y' -twasm
It compares correctly

run ./opa_darwin_arm64 eval 'x := 9223372036854775808; y := 1; x > y'
it compares correctly

run ./opa_darwin_arm64 eval 'x := 9223372036854775808; y := 1; x > y' -twasm
It fails

run ./opa_darwin_arm64 eval 'x := 18446744073709551617; y := 1; x > y' -twasm
it fails

run ./opa_darwin_arm64 eval 'x := 18446744073709551618; y := 1; x > y' -twasm
it compares correctly

This looks like an integer overflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant