From 7118f5397485d42f38e66e98b163d7396e373a4e Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 4 Sep 2018 16:51:17 +0200 Subject: Tests. --- test/libsolidity/SolidityEndToEndTest.cpp | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 85582ece..6be9d95b 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -11870,6 +11870,46 @@ BOOST_AUTO_TEST_CASE(shift_bytes_cleanup) ABI_CHECK(callContractFunction("right(uint8)", 8 * 8), encodeArgs(string(8, 0) + "123456789012")); } +BOOST_AUTO_TEST_CASE(exp_cleanup) +{ + char const* sourceCode = R"( + contract C { + function f() public pure returns (uint8 x) { + uint8 y = uint8(2) ** uint8(8); + return 0 ** y; + } + } + )"; + compileAndRun(sourceCode, 0, "C"); + ABI_CHECK(callContractFunction("f()"), encodeArgs(u256(0x1))); +} + +BOOST_AUTO_TEST_CASE(exp_cleanup_direct) +{ + char const* sourceCode = R"( + contract C { + function f() public pure returns (uint8 x) { + return uint8(0) ** uint8(uint8(2) ** uint8(8)); + } + } + )"; + compileAndRun(sourceCode, 0, "C"); + ABI_CHECK(callContractFunction("f()"), encodeArgs(u256(0x1))); +} + +BOOST_AUTO_TEST_CASE(exp_cleanup_nonzero_base) +{ + char const* sourceCode = R"( + contract C { + function f() public pure returns (uint8 x) { + return uint8(0x166) ** uint8(uint8(2) ** uint8(8)); + } + } + )"; + compileAndRun(sourceCode, 0, "C"); + ABI_CHECK(callContractFunction("f()"), encodeArgs(u256(0x1))); +} + BOOST_AUTO_TEST_CASE(cleanup_in_compound_assign) { char const* sourceCode = R"( -- cgit v1.2.3 From 120438c0cf7abc506ca90221bafa2a9cbbb12994 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 4 Sep 2018 16:51:22 +0200 Subject: Always perform cleanup for EXP. --- libsolidity/codegen/ExpressionCompiler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index 4150bc11..45e58bd0 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -2138,7 +2138,9 @@ bool ExpressionCompiler::cleanupNeededForOp(Type::Category _type, Token::Value _ { if (Token::isCompareOp(_op) || Token::isShiftOp(_op)) return true; - else if (_type == Type::Category::Integer && (_op == Token::Div || _op == Token::Mod)) + else if (_type == Type::Category::Integer && (_op == Token::Div || _op == Token::Mod || _op == Token::Exp)) + // We need cleanup for EXP because 0**0 == 1, but 0**0x100 == 0 + // It would suffice to clean the exponent, though. return true; else return false; -- cgit v1.2.3 From b84a1b390b2a5cc495b32e8757cac7efde294cc9 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 4 Sep 2018 16:55:45 +0200 Subject: Changelog entry and bug list. --- Changelog.md | 3 +++ docs/bugs.json | 7 +++++++ docs/bugs_by_version.json | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/Changelog.md b/Changelog.md index 8f3bfff9..997c4069 100644 --- a/Changelog.md +++ b/Changelog.md @@ -91,6 +91,9 @@ Compiler Features: * Code Generator: Allocate and free local variables according to their scope. * Removed ``pragma experimental "v0.5.0";``. +Critical Bugfixes: + * Code Generator: Properly perform cleanup for exponentiation and non-256 bit types. + Bugfixes: * Build System: Support versions of CVC4 linked against CLN instead of GMP. In case of compilation issues due to the experimental SMT solver support, the solvers can be disabled when configuring the project with CMake using ``-DUSE_CVC4=OFF`` or ``-DUSE_Z3=OFF``. * Tests: Fix chain parameters to make ipc tests work with newer versions of cpp-ethereum. diff --git a/docs/bugs.json b/docs/bugs.json index cf03adfe..b629d485 100644 --- a/docs/bugs.json +++ b/docs/bugs.json @@ -1,4 +1,11 @@ [ + { + "name": "ExpCleanupZero", + "summary": "Using exponentiating with types shorter than 256 bits and zero as base can result in unexpected values.", + "description": "As defined by the EVM, 0 ** 0 is one. Solidity does not always remove dirty higher order bits of types that are smaller than 256 bits before applying an operation because it does not matter if the cleanup is performed before or after the operation. This is true for EXP except for the case where the base is zero, which was overlooked.", + "fixed": "0.5.0", + "severity": "high" + }, { "name": "EventStructWrongData", "summary": "Using structs in events logged wrong data.", diff --git a/docs/bugs_by_version.json b/docs/bugs_by_version.json index ab200036..1d41626e 100644 --- a/docs/bugs_by_version.json +++ b/docs/bugs_by_version.json @@ -1,6 +1,7 @@ { "0.1.0": { "bugs": [ + "ExpCleanupZero", "ZeroFunctionSelector", "ECRecoverMalformedInput", "SkipEmptyStringLiteral", @@ -18,6 +19,7 @@ }, "0.1.1": { "bugs": [ + "ExpCleanupZero", "ZeroFunctionSelector", "ECRecoverMalformedInput", "SkipEmptyStringLiteral", @@ -35,6 +37,7 @@ }, "0.1.2": { "bugs": [ + "ExpCleanupZero", "ZeroFunctionSelector", "ECRecoverMalformedInput", "SkipEmptyStringLiteral", @@ -52,6 +55,7 @@ }, "0.1.3": { "bugs": [ + "ExpCleanupZero", "ZeroFunctionSelector", "ECRecoverMalformedInput", "SkipEmptyStringLiteral", @@ -69,6 +73,7 @@ }, "0.1.4": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "ECRecoverMalformedInput", @@ -87,6 +92,7 @@ }, "0.1.5": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "ECRecoverMalformedInput", @@ -105,6 +111,7 @@ }, "0.1.6": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "ECRecoverMalformedInput", @@ -124,6 +131,7 @@ }, "0.1.7": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "ECRecoverMalformedInput", @@ -143,6 +151,7 @@ }, "0.2.0": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "ECRecoverMalformedInput", @@ -162,6 +171,7 @@ }, "0.2.1": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "ECRecoverMalformedInput", @@ -181,6 +191,7 @@ }, "0.2.2": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "ECRecoverMalformedInput", @@ -200,6 +211,7 @@ }, "0.3.0": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -219,6 +231,7 @@ }, "0.3.1": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -237,6 +250,7 @@ }, "0.3.2": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -255,6 +269,7 @@ }, "0.3.3": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -272,6 +287,7 @@ }, "0.3.4": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -289,6 +305,7 @@ }, "0.3.5": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -306,6 +323,7 @@ }, "0.3.6": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -321,6 +339,7 @@ }, "0.4.0": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -336,6 +355,7 @@ }, "0.4.1": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -351,6 +371,7 @@ }, "0.4.10": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -362,6 +383,7 @@ }, "0.4.11": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -372,6 +394,7 @@ }, "0.4.12": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -381,6 +404,7 @@ }, "0.4.13": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -390,6 +414,7 @@ }, "0.4.14": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue" @@ -398,6 +423,7 @@ }, "0.4.15": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector" ], @@ -405,6 +431,7 @@ }, "0.4.16": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector" ], @@ -412,6 +439,7 @@ }, "0.4.17": { "bugs": [ + "ExpCleanupZero", "EventStructWrongData", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector" @@ -420,6 +448,7 @@ }, "0.4.18": { "bugs": [ + "ExpCleanupZero", "EventStructWrongData", "NestedArrayFunctionCallDecoder" ], @@ -427,6 +456,7 @@ }, "0.4.19": { "bugs": [ + "ExpCleanupZero", "EventStructWrongData", "NestedArrayFunctionCallDecoder" ], @@ -434,6 +464,7 @@ }, "0.4.2": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -448,6 +479,7 @@ }, "0.4.20": { "bugs": [ + "ExpCleanupZero", "EventStructWrongData", "NestedArrayFunctionCallDecoder" ], @@ -455,6 +487,7 @@ }, "0.4.21": { "bugs": [ + "ExpCleanupZero", "EventStructWrongData", "NestedArrayFunctionCallDecoder" ], @@ -462,6 +495,7 @@ }, "0.4.22": { "bugs": [ + "ExpCleanupZero", "EventStructWrongData", "OneOfTwoConstructorsSkipped" ], @@ -469,18 +503,21 @@ }, "0.4.23": { "bugs": [ + "ExpCleanupZero", "EventStructWrongData" ], "released": "2018-04-19" }, "0.4.24": { "bugs": [ + "ExpCleanupZero", "EventStructWrongData" ], "released": "2018-05-16" }, "0.4.3": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -494,6 +531,7 @@ }, "0.4.4": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -506,6 +544,7 @@ }, "0.4.5": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -519,6 +558,7 @@ }, "0.4.6": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -531,6 +571,7 @@ }, "0.4.7": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -542,6 +583,7 @@ }, "0.4.8": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -553,6 +595,7 @@ }, "0.4.9": { "bugs": [ + "ExpCleanupZero", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", -- cgit v1.2.3 From 9f6a12eeb5b44d7e9de82864d89c98a2349fb929 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 6 Sep 2018 17:30:51 +0200 Subject: Update bug description, add regex and tests. --- docs/bugs.json | 11 +++--- docs/bugs_by_version.json | 86 ++++++++++++++++++++++---------------------- test/buglist_test_vectors.md | 34 ++++++++++++++++++ 3 files changed, 83 insertions(+), 48 deletions(-) diff --git a/docs/bugs.json b/docs/bugs.json index b629d485..980b3897 100644 --- a/docs/bugs.json +++ b/docs/bugs.json @@ -1,10 +1,11 @@ [ { - "name": "ExpCleanupZero", - "summary": "Using exponentiating with types shorter than 256 bits and zero as base can result in unexpected values.", - "description": "As defined by the EVM, 0 ** 0 is one. Solidity does not always remove dirty higher order bits of types that are smaller than 256 bits before applying an operation because it does not matter if the cleanup is performed before or after the operation. This is true for EXP except for the case where the base is zero, which was overlooked.", - "fixed": "0.5.0", - "severity": "high" + "name": "ExpExponentCleanup", + "summary": "Using the ** operator with an exponent of type shorter than 256 bits can result in unexpected values.", + "description": "Higher order bits in the exponent are not properly cleaned before the EXP opcode is applied if the type of the exponent expression is smaller than 256 bits and not smaller than the type of the base. In that case, the result might be larger than expected if the exponent is assumed to lie within the value range of the type. Literal numbers as exponents are unaffected as are exponents or bases of type uint256.", + "fixed": "0.4.25", + "severity": "medium/high", + "check": {"regex-source": "[^/]\\*\\* *[^/0-9 ]"} }, { "name": "EventStructWrongData", diff --git a/docs/bugs_by_version.json b/docs/bugs_by_version.json index 1d41626e..96cc3c5c 100644 --- a/docs/bugs_by_version.json +++ b/docs/bugs_by_version.json @@ -1,7 +1,7 @@ { "0.1.0": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "ZeroFunctionSelector", "ECRecoverMalformedInput", "SkipEmptyStringLiteral", @@ -19,7 +19,7 @@ }, "0.1.1": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "ZeroFunctionSelector", "ECRecoverMalformedInput", "SkipEmptyStringLiteral", @@ -37,7 +37,7 @@ }, "0.1.2": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "ZeroFunctionSelector", "ECRecoverMalformedInput", "SkipEmptyStringLiteral", @@ -55,7 +55,7 @@ }, "0.1.3": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "ZeroFunctionSelector", "ECRecoverMalformedInput", "SkipEmptyStringLiteral", @@ -73,7 +73,7 @@ }, "0.1.4": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "ECRecoverMalformedInput", @@ -92,7 +92,7 @@ }, "0.1.5": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "ECRecoverMalformedInput", @@ -111,7 +111,7 @@ }, "0.1.6": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "ECRecoverMalformedInput", @@ -131,7 +131,7 @@ }, "0.1.7": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "ECRecoverMalformedInput", @@ -151,7 +151,7 @@ }, "0.2.0": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "ECRecoverMalformedInput", @@ -171,7 +171,7 @@ }, "0.2.1": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "ECRecoverMalformedInput", @@ -191,7 +191,7 @@ }, "0.2.2": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "ECRecoverMalformedInput", @@ -211,7 +211,7 @@ }, "0.3.0": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -231,7 +231,7 @@ }, "0.3.1": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -250,7 +250,7 @@ }, "0.3.2": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -269,7 +269,7 @@ }, "0.3.3": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -287,7 +287,7 @@ }, "0.3.4": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -305,7 +305,7 @@ }, "0.3.5": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -323,7 +323,7 @@ }, "0.3.6": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -339,7 +339,7 @@ }, "0.4.0": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -355,7 +355,7 @@ }, "0.4.1": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -371,7 +371,7 @@ }, "0.4.10": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -383,7 +383,7 @@ }, "0.4.11": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -394,7 +394,7 @@ }, "0.4.12": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -404,7 +404,7 @@ }, "0.4.13": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -414,7 +414,7 @@ }, "0.4.14": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue" @@ -423,7 +423,7 @@ }, "0.4.15": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector" ], @@ -431,7 +431,7 @@ }, "0.4.16": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector" ], @@ -439,7 +439,7 @@ }, "0.4.17": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "EventStructWrongData", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector" @@ -448,7 +448,7 @@ }, "0.4.18": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "EventStructWrongData", "NestedArrayFunctionCallDecoder" ], @@ -456,7 +456,7 @@ }, "0.4.19": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "EventStructWrongData", "NestedArrayFunctionCallDecoder" ], @@ -464,7 +464,7 @@ }, "0.4.2": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -479,7 +479,7 @@ }, "0.4.20": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "EventStructWrongData", "NestedArrayFunctionCallDecoder" ], @@ -487,7 +487,7 @@ }, "0.4.21": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "EventStructWrongData", "NestedArrayFunctionCallDecoder" ], @@ -495,7 +495,7 @@ }, "0.4.22": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "EventStructWrongData", "OneOfTwoConstructorsSkipped" ], @@ -503,21 +503,21 @@ }, "0.4.23": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "EventStructWrongData" ], "released": "2018-04-19" }, "0.4.24": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "EventStructWrongData" ], "released": "2018-05-16" }, "0.4.3": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -531,7 +531,7 @@ }, "0.4.4": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -544,7 +544,7 @@ }, "0.4.5": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -558,7 +558,7 @@ }, "0.4.6": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -571,7 +571,7 @@ }, "0.4.7": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -583,7 +583,7 @@ }, "0.4.8": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", @@ -595,7 +595,7 @@ }, "0.4.9": { "bugs": [ - "ExpCleanupZero", + "ExpExponentCleanup", "NestedArrayFunctionCallDecoder", "ZeroFunctionSelector", "DelegateCallReturnValue", diff --git a/test/buglist_test_vectors.md b/test/buglist_test_vectors.md index f15cf151..e683f481 100644 --- a/test/buglist_test_vectors.md +++ b/test/buglist_test_vectors.md @@ -68,6 +68,40 @@ function f() m(uint[2][2]) { } function f() returns (uint, uint) { uint[2][2] memory x; } +# ExpExponentCleanup + +## buggy + +x ** y + +-- + +x ** uint8(y) + +-- + +x**y + +## fine + +x ** 2 + +-- + +x**2 + +-- + +x**200 + +-- + +/** bla **/ + +-- + +/**/ + # EventStructWrongData ## buggy -- cgit v1.2.3