Bug: Negation in 'luaV_shiftr' may overflow
Negation of an unchecked lua_Integer overflows with mininteger.
This commit is contained in:
1 parent
8a32e0aa4a
commit
62fb934427
2 files changed
+6
-1
No files matched your search
@@ -45,6 +45,11 @@ assert(-1 >> numbits == 0 and
|
||||
-1 << numbits == 0 and
|
||||
-1 << -numbits == 0)
|
||||
|
||||
assert(1 >> math.mininteger == 0)
|
||||
assert(1 >> math.maxinteger == 0)
|
||||
assert(1 << math.mininteger == 0)
|
||||
assert(1 << math.maxinteger == 0)
|
||||
|
||||
assert((2^30 - 1) << 2^30 == 0)
|
||||
assert((2^30 - 1) >> 2^30 == 0)
|
||||
|
||||
|
||||
Reference in new issue
Block a user