- edited description
encoding of 1 with BitVectors failed
Issue #2
resolved
The following skink test fails when bits is 32:
1.withUBits(bits)
Comments (5)
-
reporter -
reporter Added new tests in ScalaSMT with:
1.withUbits(32)
and reproduced problem. Line 149 of require in BitVectors.scala triggers an error.
-
reporter Cause of the problem: with 32 bits there is an overflow in the computation of (1 << 32) - 1 which yields 0 instead of 4294967295.
Now use BigInt to perform this check and inside apply at 117 and 146. This fixes the problem.
-
reporter Fix issue _.withUBits(32) or a number larger than 32 which produces an overflow.
→ <<cset 1624e9eaa8e0>>
-
reporter - changed status to resolved
Fix issue _.withUBits(32) or a number larger than 32 which produces an overflow.
→ <<cset 1624e9eaa8e0>>
- Log in to comment