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

What appears to be a bug of comparison operators in Zen #33

Closed
shiibaryu opened this issue Jun 14, 2021 · 1 comment · Fixed by #34
Closed

What appears to be a bug of comparison operators in Zen #33

shiibaryu opened this issue Jun 14, 2021 · 1 comment · Fixed by #34

Comments

@shiibaryu
Copy link

Hi, I have developed a data plane verification software using Zen and found what appears to be a bug of comparison operators in Zen.

The following comparison operation will be false in Zen, but true in C#.

Zen<ulong> a = 0xffffffffffffffff; 
Zen<ulong> b = 0x1000000000000000;
// false
Console.WriteLine(a > b);

ulong c = 0xffffffffffffffff;
ulong d = 0x1000000000000000;
// true
Console.WriteLine(c > d);

Could you check it ?

Thanks.

@rabeckett
Copy link
Member

Thanks for the clear bug report. This looks like a bug in the constant simplifier that is treating a ulong as a long for the comparison. Should be an easy fix.

@rabeckett rabeckett linked a pull request Jun 22, 2021 that will close this issue
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 a pull request may close this issue.

2 participants