Fixes u256 overflow in logical shift optimization rule and adds tests.

This commit is contained in:
Bhargava Shastry
2019-03-13 11:19:20 +01:00
committed by chriseth
parent 2f37cd0986
commit 515fa872c8
7 changed files with 80 additions and 5 deletions
+12
View File
@@ -1,4 +1,16 @@
[
{
"name": "DoubleShiftSizeOverflow",
"summary": "Double bitwise shifts by large constants whose sum overflows 256 bits can result in unexpected values.",
"description": "Nested logical shift operations whose total shift size is 2**256 or more are incorrectly optimized. This only applies to shifts by numbers of bits that are compile-time constant expressions.",
"introduced": "0.5.5",
"fixed": "0.5.6",
"severity": "low",
"conditions": {
"optimizer": true,
"evmVersion": ">=constantinople"
}
},
{
"name": "ExpExponentCleanup",
"summary": "Using the ** operator with an exponent of type shorter than 256 bits can result in unexpected values.",