ultimate-pa / ultimate

The Ultimate program analysis framework.
https://ultimate-pa.org/
197 stars 41 forks source link

Bug: Default config missing an error after overflowing shift #665

Closed Novak756 closed 5 months ago

Novak756 commented 5 months ago

Basic Info

Description

Hi again, running the default config (for any of Automizer, Taipan, Kojak, GemCutter) on the above file gives Ultimate proved your program to be correct!. Again the bitvector config is able to find the error. Clearly the assertion should be reachable, and while this program includes overflow, it should be well-defined (as it is unsigned). If this is expected, feel free to close this issue.

schuessf commented 5 months ago

Thank you for your report! There was indeed a bug that I just fixed. We added an assumption that the result of a left shift is always greater than the first operand, if the second operand is not zero. This is a reasonable assumption for signed types, since we assume that there are no overflows. However, for unsigned types this assumption was wrong (as there can be a legal wraparound), therefore I removed this assumption in that case.