Merge pull request #9862 from ethereum/develop

Merge develop into breaking
This commit is contained in:
chriseth
2020-09-23 12:22:32 +02:00
committed by GitHub
126 changed files with 2962 additions and 320 deletions
@@ -9,7 +9,7 @@ Optimized IR:
object "C_6" {
code {
{
mstore(64, 128)
mstore(64, memoryguard(0x80))
if callvalue() { revert(0, 0) }
let _1 := datasize("C_6_deployed")
codecopy(0, dataoffset("C_6_deployed"), _1)
@@ -19,7 +19,7 @@ object "C_6" {
object "C_6_deployed" {
code {
{
mstore(64, 128)
mstore(64, memoryguard(0x80))
revert(0, 0)
}
}
@@ -37,7 +37,7 @@ Optimized IR:
object "D_9" {
code {
{
mstore(64, 128)
mstore(64, memoryguard(0x80))
if callvalue() { revert(0, 0) }
let _1 := datasize("D_9_deployed")
codecopy(0, dataoffset("D_9_deployed"), _1)
@@ -47,7 +47,7 @@ object "D_9" {
object "D_9_deployed" {
code {
{
mstore(64, 128)
mstore(64, memoryguard(0x80))
revert(0, 0)
}
}
+17 -16
View File
@@ -9,7 +9,7 @@ Optimized IR:
object "C_2" {
code {
{
mstore(64, 128)
mstore(64, memoryguard(0x80))
if callvalue() { revert(0, 0) }
let _1 := datasize("C_2_deployed")
codecopy(0, dataoffset("C_2_deployed"), _1)
@@ -19,7 +19,7 @@ object "C_2" {
object "C_2_deployed" {
code {
{
mstore(64, 128)
mstore(64, memoryguard(0x80))
revert(0, 0)
}
}
@@ -37,7 +37,7 @@ Optimized IR:
object "D_13" {
code {
{
mstore(64, 128)
mstore(64, memoryguard(0x80))
if callvalue() { revert(0, 0) }
let _1 := datasize("D_13_deployed")
codecopy(0, dataoffset("D_13_deployed"), _1)
@@ -47,20 +47,21 @@ object "D_13" {
object "D_13_deployed" {
code {
{
mstore(64, 128)
let _1 := memoryguard(0x80)
mstore(64, _1)
if iszero(lt(calldatasize(), 4))
{
let _1 := 0
if eq(0x26121ff0, shr(224, calldataload(_1)))
let _2 := 0
if eq(0x26121ff0, shr(224, calldataload(_2)))
{
if callvalue() { revert(_1, _1) }
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
let _2 := datasize("C_2")
let _3 := add(128, _2)
if or(gt(_3, 0xffffffffffffffff), lt(_3, 128)) { revert(_1, _1) }
datacopy(128, dataoffset("C_2"), _2)
pop(create(_1, 128, _2))
return(allocateMemory(_1), _1)
if callvalue() { revert(_2, _2) }
if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }
let _3 := datasize("C_2")
let _4 := add(_1, _3)
if or(gt(_4, 0xffffffffffffffff), lt(_4, _1)) { revert(_2, _2) }
datacopy(_1, dataoffset("C_2"), _3)
pop(create(_2, _1, sub(_4, _1)))
return(allocateMemory(_2), _2)
}
}
revert(0, 0)
@@ -76,7 +77,7 @@ object "D_13" {
object "C_2" {
code {
{
mstore(64, 128)
mstore(64, memoryguard(0x80))
if callvalue() { revert(0, 0) }
let _1 := datasize("C_2_deployed")
codecopy(0, dataoffset("C_2_deployed"), _1)
@@ -86,7 +87,7 @@ object "D_13" {
object "C_2_deployed" {
code {
{
mstore(64, 128)
mstore(64, memoryguard(0x80))
revert(0, 0)
}
}
@@ -0,0 +1 @@
--ir-optimized --optimize
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0.0;
contract D {
constructor() { assembly {}}
function f() public pure {}
}
@@ -0,0 +1,40 @@
Optimized IR:
/*******************************************************
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*******************************************************/
object "D_11" {
code {
{
mstore(64, 128)
if callvalue() { revert(0, 0) }
let _1 := datasize("D_11_deployed")
codecopy(0, dataoffset("D_11_deployed"), _1)
return(0, _1)
}
}
object "D_11_deployed" {
code {
{
let _1 := memoryguard(0x80)
mstore(64, _1)
if iszero(lt(calldatasize(), 4))
{
let _2 := 0
if eq(0x26121ff0, shr(224, calldataload(_2)))
{
if callvalue() { revert(_2, _2) }
if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }
if gt(_1, 0xffffffffffffffff) { revert(_2, _2) }
mstore(64, _1)
return(_1, _2)
}
}
revert(0, 0)
}
}
}
}
@@ -0,0 +1 @@
--ir-optimized --optimize
@@ -0,0 +1,8 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0.0;
contract D {
function f() public pure {
assembly {}
}
}
@@ -0,0 +1,38 @@
Optimized IR:
/*******************************************************
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*******************************************************/
object "D_7" {
code {
{
mstore(64, memoryguard(0x80))
if callvalue() { revert(0, 0) }
let _1 := datasize("D_7_deployed")
codecopy(0, dataoffset("D_7_deployed"), _1)
return(0, _1)
}
}
object "D_7_deployed" {
code {
{
mstore(64, 128)
if iszero(lt(calldatasize(), 4))
{
let _1 := 0
if eq(0x26121ff0, shr(224, calldataload(_1)))
{
if callvalue() { revert(_1, _1) }
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
mstore(64, 128)
return(128, _1)
}
}
revert(0, 0)
}
}
}
}
+2 -2
View File
@@ -9,7 +9,7 @@ Optimized IR:
object "C_56" {
code {
{
mstore(64, 128)
mstore(64, memoryguard(0x80))
if callvalue() { revert(0, 0) }
let _1 := datasize("C_56_deployed")
codecopy(0, dataoffset("C_56_deployed"), _1)
@@ -19,7 +19,7 @@ object "C_56" {
object "C_56_deployed" {
code {
{
mstore(64, 128)
mstore(64, memoryguard(0x80))
if iszero(lt(calldatasize(), 4))
{
let _1 := 0
@@ -9,7 +9,7 @@ Optimized IR:
object "Arraysum_33" {
code {
{
mstore(64, 128)
mstore(64, memoryguard(0x80))
if callvalue() { revert(0, 0) }
let _1 := datasize("Arraysum_33_deployed")
codecopy(0, dataoffset("Arraysum_33_deployed"), _1)
@@ -19,7 +19,7 @@ object "Arraysum_33" {
object "Arraysum_33_deployed" {
code {
{
mstore(64, 128)
mstore(64, memoryguard(0x80))
if iszero(lt(calldatasize(), 4))
{
let _1 := 0
@@ -7,7 +7,7 @@
object \"C_6\" {
code {
mstore(64, 128)
mstore(64, memoryguard(128))
if callvalue() { revert(0, 0) }
constructor_C_6()
codecopy(0, dataoffset(\"C_6_deployed\"), datasize(\"C_6_deployed\"))
@@ -17,7 +17,7 @@ object \"C_6\" {
}
object \"C_6_deployed\" {
code {
mstore(64, 128)
mstore(64, memoryguard(128))
if iszero(lt(calldatasize(), 4))
{
let selector := shift_right_224_unsigned(calldataload(0))
@@ -8,7 +8,7 @@
object \"C_6\" {
code {
mstore(64, 128)
mstore(64, memoryguard(128))
if callvalue() { revert(0, 0) }
constructor_C_6()
@@ -24,7 +24,7 @@ object \"C_6\" {
}
object \"C_6_deployed\" {
code {
mstore(64, 128)
mstore(64, memoryguard(128))
if iszero(lt(calldatasize(), 4))
{
+2 -2
View File
@@ -9,7 +9,7 @@ Optimized IR:
object "C_6" {
code {
{
mstore(64, 128)
mstore(64, memoryguard(0x80))
if callvalue() { revert(0, 0) }
codecopy(0, dataoffset("C_6_deployed"), datasize("C_6_deployed"))
return(0, datasize("C_6_deployed"))
@@ -18,7 +18,7 @@ object "C_6" {
object "C_6_deployed" {
code {
{
mstore(64, 128)
mstore(64, memoryguard(0x80))
if iszero(lt(calldatasize(), 4))
{
let selector := shift_right_224_unsigned(calldataload(0))
@@ -8,7 +8,7 @@
object \"C_10\" {
code {
mstore(64, 128)
mstore(64, memoryguard(128))
if callvalue() { revert(0, 0) }
constructor_C_10()
@@ -24,7 +24,7 @@ object \"C_10\" {
}
object \"C_10_deployed\" {
code {
mstore(64, 128)
mstore(64, memoryguard(128))
if iszero(lt(calldatasize(), 4))
{
@@ -8,7 +8,7 @@
object \"C_10\" {
code {
mstore(64, 128)
mstore(64, memoryguard(128))
if callvalue() { revert(0, 0) }
constructor_C_10()
@@ -24,7 +24,7 @@ object \"C_10\" {
}
object \"C_10_deployed\" {
code {
mstore(64, 128)
mstore(64, memoryguard(128))
if iszero(lt(calldatasize(), 4))
{
@@ -8,7 +8,7 @@
object \"C_10\" {
code {
mstore(64, 128)
mstore(64, memoryguard(128))
if callvalue() { revert(0, 0) }
constructor_C_10()
@@ -24,7 +24,7 @@ object \"C_10\" {
}
object \"C_10_deployed\" {
code {
mstore(64, 128)
mstore(64, memoryguard(128))
if iszero(lt(calldatasize(), 4))
{
@@ -8,7 +8,7 @@
object \"C_10\" {
code {
mstore(64, 128)
mstore(64, memoryguard(128))
if callvalue() { revert(0, 0) }
constructor_C_10()
@@ -24,7 +24,7 @@ object \"C_10\" {
}
object \"C_10_deployed\" {
code {
mstore(64, 128)
mstore(64, memoryguard(128))
if iszero(lt(calldatasize(), 4))
{
@@ -8,7 +8,7 @@
object \"C_10\" {
code {
mstore(64, 128)
mstore(64, memoryguard(128))
if callvalue() { revert(0, 0) }
constructor_C_10()
@@ -24,7 +24,7 @@ object \"C_10\" {
}
object \"C_10_deployed\" {
code {
mstore(64, 128)
mstore(64, memoryguard(128))
if iszero(lt(calldatasize(), 4))
{
@@ -16,7 +16,6 @@
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 8,
"linearizedBaseContracts":
[
@@ -25,7 +25,6 @@
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
8
@@ -16,7 +16,6 @@
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 6,
"linearizedBaseContracts":
[
@@ -25,7 +25,6 @@
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
6
@@ -52,7 +52,7 @@ BOOST_AUTO_TEST_CASE(function_no_implementation)
std::vector<ASTPointer<ASTNode>> nodes = sourceUnit->nodes();
ContractDefinition* contract = dynamic_cast<ContractDefinition*>(nodes[1].get());
BOOST_REQUIRE(contract);
BOOST_CHECK(!contract->annotation().unimplementedDeclarations.empty());
BOOST_CHECK(!contract->annotation().unimplementedDeclarations->empty());
BOOST_CHECK(!contract->definedFunctions()[0]->isImplemented());
}
@@ -68,10 +68,10 @@ BOOST_AUTO_TEST_CASE(abstract_contract)
ContractDefinition* base = dynamic_cast<ContractDefinition*>(nodes[1].get());
ContractDefinition* derived = dynamic_cast<ContractDefinition*>(nodes[2].get());
BOOST_REQUIRE(base);
BOOST_CHECK(!base->annotation().unimplementedDeclarations.empty());
BOOST_CHECK(!base->annotation().unimplementedDeclarations->empty());
BOOST_CHECK(!base->definedFunctions()[0]->isImplemented());
BOOST_REQUIRE(derived);
BOOST_CHECK(derived->annotation().unimplementedDeclarations.empty());
BOOST_CHECK(derived->annotation().unimplementedDeclarations->empty());
BOOST_CHECK(derived->definedFunctions()[0]->isImplemented());
}
@@ -87,9 +87,9 @@ BOOST_AUTO_TEST_CASE(abstract_contract_with_overload)
ContractDefinition* base = dynamic_cast<ContractDefinition*>(nodes[1].get());
ContractDefinition* derived = dynamic_cast<ContractDefinition*>(nodes[2].get());
BOOST_REQUIRE(base);
BOOST_CHECK(!base->annotation().unimplementedDeclarations.empty());
BOOST_CHECK(!base->annotation().unimplementedDeclarations->empty());
BOOST_REQUIRE(derived);
BOOST_CHECK(!derived->annotation().unimplementedDeclarations.empty());
BOOST_CHECK(!derived->annotation().unimplementedDeclarations->empty());
}
BOOST_AUTO_TEST_CASE(implement_abstract_via_constructor)
@@ -104,7 +104,7 @@ BOOST_AUTO_TEST_CASE(implement_abstract_via_constructor)
BOOST_CHECK_EQUAL(nodes.size(), 3);
ContractDefinition* derived = dynamic_cast<ContractDefinition*>(nodes[2].get());
BOOST_REQUIRE(derived);
BOOST_CHECK(!derived->annotation().unimplementedDeclarations.empty());
BOOST_CHECK(!derived->annotation().unimplementedDeclarations->empty());
}
BOOST_AUTO_TEST_CASE(function_canonical_signature)
@@ -0,0 +1,53 @@
contract C {
uint256[1024] s;
function f() public returns (uint256 x) {
x = 42;
uint256 x0 = s[0];
uint256 x1 = s[1];
uint256 x2 = s[2];
uint256 x3 = s[3];
uint256 x4 = s[4];
uint256 x5 = s[5];
uint256 x6 = s[6];
uint256 x7 = s[7];
uint256 x8 = s[8];
uint256 x9 = s[9];
uint256 x10 = s[10];
uint256 x11 = s[11];
uint256 x12 = s[12];
uint256 x13 = s[13];
uint256 x14 = s[14];
uint256 x15 = s[15];
uint256 x16 = s[16];
uint256 x17 = s[17];
uint256 x18 = s[18];
s[1000] = x0 + 2;
s[118] = x18;
s[117] = x17;
s[116] = x16;
s[115] = x15;
s[114] = x14;
s[113] = x13;
s[112] = x12;
s[111] = x11;
s[110] = x10;
s[109] = x9;
s[108] = x8;
s[107] = x7;
s[106] = x6;
s[105] = x5;
s[104] = x4;
s[103] = x3;
s[102] = x2;
s[101] = x1;
s[100] = x0;
}
function test() public view returns(uint256) {
return s[1000];
}
}
// ====
// compileViaYul: true
// ----
// f() -> 0x2a
// test() -> 2
@@ -0,0 +1,57 @@
contract C {
uint256[1024] s;
function g() public returns (uint256) {
// try to prevent inlining
return f() + f() + f() + f() + f();
}
function f() public returns (uint256 x) {
x = 42;
uint256 x0 = s[0];
uint256 x1 = s[1];
uint256 x2 = s[2];
uint256 x3 = s[3];
uint256 x4 = s[4];
uint256 x5 = s[5];
uint256 x6 = s[6];
uint256 x7 = s[7];
uint256 x8 = s[8];
uint256 x9 = s[9];
uint256 x10 = s[10];
uint256 x11 = s[11];
uint256 x12 = s[12];
uint256 x13 = s[13];
uint256 x14 = s[14];
uint256 x15 = s[15];
uint256 x16 = s[16];
uint256 x17 = s[17];
uint256 x18 = s[18];
s[1000] = x0 + 2;
s[118] = x18;
s[117] = x17;
s[116] = x16;
s[115] = x15;
s[114] = x14;
s[113] = x13;
s[112] = x12;
s[111] = x11;
s[110] = x10;
s[109] = x9;
s[108] = x8;
s[107] = x7;
s[106] = x6;
s[105] = x5;
s[104] = x4;
s[103] = x3;
s[102] = x2;
s[101] = x1;
s[100] = x0;
}
function test() public view returns(uint256) {
return s[1000];
}
}
// ====
// compileViaYul: true
// ----
// f() -> 0x2a
// test() -> 2
@@ -15,6 +15,3 @@ contract C
}
}
// ----
// Warning 5084: (208-218): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (123-133): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (208-218): Type conversion is not yet fully supported and might yield false positives.
@@ -20,8 +20,3 @@ contract C
}
}
// ----
// Warning 5084: (271-281): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (123-133): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (271-281): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (186-196): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (271-281): Type conversion is not yet fully supported and might yield false positives.
@@ -20,8 +20,3 @@ contract C
}
}
// ----
// Warning 5084: (275-285): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (123-133): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (275-285): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (189-199): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (275-285): Type conversion is not yet fully supported and might yield false positives.
@@ -25,7 +25,3 @@ contract C
}
// ----
// Warning 5084: (275-285): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (123-133): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (189-199): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (275-285): Type conversion is not yet fully supported and might yield false positives.
@@ -16,6 +16,3 @@ contract C
}
}
// ----
// Warning 5084: (219-229): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (134-144): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (219-229): Type conversion is not yet fully supported and might yield false positives.
@@ -19,6 +19,3 @@ contract C
}
}
// ----
// Warning 5084: (249-259): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (118-128): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (249-259): Type conversion is not yet fully supported and might yield false positives.
@@ -20,6 +20,3 @@ contract C
}
}
// ----
// Warning 5084: (247-257): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (162-172): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (247-257): Type conversion is not yet fully supported and might yield false positives.
@@ -35,4 +35,3 @@ contract C {
}
// ----
// Warning 6328: (528-565): Assertion violation happens here.
// Warning 5084: (544-554): Type conversion is not yet fully supported and might yield false positives.
@@ -44,4 +44,3 @@ contract C {
// ----
// Warning 6328: (452-466): Assertion violation happens here.
// Warning 6328: (470-496): Assertion violation happens here.
// Warning 5084: (92-102): Type conversion is not yet fully supported and might yield false positives.
@@ -36,4 +36,3 @@ contract C {
// ----
// Warning 6328: (381-395): Assertion violation happens here.
// Warning 6328: (399-425): Assertion violation happens here.
// Warning 5084: (116-126): Type conversion is not yet fully supported and might yield false positives.
@@ -40,4 +40,3 @@ contract C {
// ----
// Warning 6328: (435-461): Assertion violation happens here.
// Warning 6328: (594-631): Assertion violation happens here.
// Warning 5084: (610-620): Type conversion is not yet fully supported and might yield false positives.
@@ -13,4 +13,3 @@ contract C {
}
}
// ----
// Warning 5084: (198-208): Type conversion is not yet fully supported and might yield false positives.
@@ -13,4 +13,3 @@ contract C {
}
}
// ----
// Warning 5084: (107-117): Type conversion is not yet fully supported and might yield false positives.
@@ -17,5 +17,3 @@ contract C
}
}
// ----
// Warning 5084: (205-215): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (205-215): Type conversion is not yet fully supported and might yield false positives.
@@ -10,4 +10,3 @@ contract C
}
}
// ----
// Warning 5084: (98-108): Type conversion is not yet fully supported and might yield false positives.
@@ -0,0 +1,25 @@
pragma experimental SMTChecker;
contract C {
address x; // We know that this is "zero initialised".
function f() public view {
address a = address(0);
assert(x == address(0));
assert(x == a);
}
function g() public pure {
address a = address(0);
address b = address(1);
address c = address(0);
address d = a;
address e = address(0x12345678);
assert(c == d);
assert(a == c);
assert(e == address(305419896));
// This is untrue.
assert(a == b);
}
}
// ----
// Warning 6328: (487-501): Assertion violation happens here.
@@ -8,5 +8,3 @@ contract C
}
}
// ----
// Warning 5084: (98-108): Type conversion is not yet fully supported and might yield false positives.
// Warning 5084: (125-135): Type conversion is not yet fully supported and might yield false positives.
@@ -11,4 +11,3 @@ contract C {
}
}
// ----
// Warning 5084: (142-152): Type conversion is not yet fully supported and might yield false positives.
@@ -0,0 +1,13 @@
contract test {
function f(uint a, bool b, bytes memory c, uint d, bool e) public returns (uint r) {
if (b && !e)
r = a + d;
else
r = c.length;
}
function g() public returns (uint r) {
r = f({c: "abc", x: 1, e: 2, a: 11, b: 12});
}
}
// ----
// TypeError 4974: (249-288): Named argument "x" does not match function declaration.
@@ -13,6 +13,8 @@ contract b {
}
// ----
// Warning 7325: (66-67): Type struct b.c covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (66-67): Type uint256[14474011154664524427946373126085988481658748083205070504932198000989141204992] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (111-112): Type struct b.c covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (111-112): Type uint256[14474011154664524427946373126085988481658748083205070504932198000989141204992] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (152-169): Type function ()[984770902183611232881] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 2072: (152-180): Unused local variable.
@@ -56,13 +56,19 @@ contract C {
}
// ----
// Warning 7325: (106-108): Type struct C.S0 covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (106-108): Type struct C.P[101] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (171-173): Type struct C.S1 covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (171-173): Type struct C.P[102] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (341-343): Type struct C.P[103] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (341-343): Type struct C.P[104] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (505-507): Type uint256[100000000000000000002] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (505-507): Type uint256[100000000000000000004] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (505-507): Type struct C.Q0 covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (505-507): Type uint256[1][][100000000000000000001] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (505-507): Type uint256[][100000000000000000003] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (505-507): Type uint256[100000000000000000004] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (505-507): Type uint256[100000000000000000002] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (576-578): Type struct C.Q1 covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (576-578): Type uint256[1][][100000000000000000005] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (647-649): Type uint256[100000000000000000006] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (715-717): Type struct C.Q3 covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (715-717): Type uint256[][100000000000000000007] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (783-785): Type uint256[100000000000000000008] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
@@ -4,5 +4,5 @@ contract C {
uint[2**255][2] a;
}
// ----
// TypeError 7676: (60-97): Contract too large for storage.
// TypeError 7676: (60-97): Contract requires too much storage.
// TypeError 1534: (77-94): Type too large for storage.
@@ -5,4 +5,4 @@ contract C {
uint[2**255] b;
}
// ----
// TypeError 7676: (60-114): Contract too large for storage.
// TypeError 7676: (60-114): Contract requires too much storage.
@@ -7,4 +7,4 @@ contract D is C {
uint[2**255] b;
}
// ----
// TypeError 7676: (95-134): Contract too large for storage.
// TypeError 7676: (95-134): Contract requires too much storage.
@@ -8,5 +8,5 @@ contract C {
S s;
}
// ----
// TypeError 7676: (60-152): Contract too large for storage.
// TypeError 7676: (60-152): Contract requires too much storage.
// TypeError 1534: (146-149): Type too large for storage.
@@ -4,3 +4,4 @@ contract C {
}
// ----
// Warning 7325: (64-65): Type struct C.S covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
// Warning 7325: (64-65): Type uint256[57896044618658097711785492504343953926634992332820282019728792003956564819968] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
@@ -1,11 +0,0 @@
contract test {
function a(uint a, uint b) public returns (uint r) {
r = a + b;
}
function b() public returns (uint r) {
r = a({a: 1, c: 2});
}
}
// ----
// Warning 2519: (31-37): This declaration shadows an existing declaration.
// TypeError 4974: (153-168): Named argument "c" does not match function declaration.
@@ -0,0 +1,7 @@
contract C {
function f() public pure {
abi.encodePacked([new uint[](5), new uint[](7)]);
}
}
// ----
// TypeError 9578: (69-99): Type not supported in packed mode.
@@ -0,0 +1,9 @@
pragma experimental ABIEncoderV2;
contract C {
function f() public pure {
abi.encodePacked([new uint[](5), new uint[](7)]);
}
}
// ----
// TypeError 9578: (104-134): Type not supported in packed mode.
@@ -0,0 +1,7 @@
contract C {
function test() public pure {
abi.encode([new uint[](5), new uint[](7)]);
}
}
// ----
// TypeError 2056: (66-96): This type cannot be encoded.
@@ -0,0 +1,9 @@
pragma experimental ABIEncoderV2;
contract C {
function f() public pure {
abi.encode([new uint[](5), new uint[](7)]);
}
}
// ----
// Warning 6133: (87-129): Statement has no effect.
@@ -0,0 +1,7 @@
contract C {
function f() public pure {
abi.decode("1234", (uint[][3]));
}
}
// ----
// TypeError 9611: (72-81): Decoding type uint256[] memory[3] memory not supported.
@@ -0,0 +1,9 @@
pragma experimental ABIEncoderV2;
contract C {
function f() public pure {
abi.decode("1234", (uint[][3]));
}
}
// ----
// Warning 6133: (87-118): Statement has no effect.
@@ -0,0 +1,11 @@
struct S {
uint x;
}
contract C {
function f() public pure {
abi.decode("1234", (S));
}
}
// ----
// TypeError 9611: (98-99): Decoding type struct S memory not supported.
@@ -0,0 +1,13 @@
pragma experimental ABIEncoderV2;
struct S {
uint x;
}
contract C {
function f() public pure {
abi.decode("1234", (S));
}
}
// ----
// Warning 6133: (113-136): Statement has no effect.
+1 -1
View File
@@ -39,7 +39,7 @@ string check(string const& _input)
Object obj;
std::tie(obj.code, obj.analysisInfo) = yul::test::parse(_input, false);
BOOST_REQUIRE(obj.code);
map<YulString, int> functions = CompilabilityChecker::run(EVMDialect::strictAssemblyForEVM(solidity::test::CommonOptions::get().evmVersion()), obj, true);
auto functions = CompilabilityChecker(EVMDialect::strictAssemblyForEVM(solidity::test::CommonOptions::get().evmVersion()), obj, true).stackDeficit;
string out;
for (auto const& function: functions)
out += function.first.str() + ": " + to_string(function.second) + " ";
+55
View File
@@ -46,6 +46,7 @@
#include <libyul/optimiser/LoadResolver.h>
#include <libyul/optimiser/LoopInvariantCodeMotion.h>
#include <libyul/optimiser/MainFunction.h>
#include <libyul/optimiser/StackLimitEvader.h>
#include <libyul/optimiser/NameDisplacer.h>
#include <libyul/optimiser/Rematerialiser.h>
#include <libyul/optimiser/ExpressionSimplifier.h>
@@ -60,6 +61,7 @@
#include <libyul/optimiser/RedundantAssignEliminator.h>
#include <libyul/optimiser/StructuralSimplifier.h>
#include <libyul/optimiser/StackCompressor.h>
#include <libyul/optimiser/StackToMemoryMover.h>
#include <libyul/optimiser/Suite.h>
#include <libyul/backends/evm/ConstantOptimiser.h>
#include <libyul/backends/evm/EVMDialect.h>
@@ -70,6 +72,7 @@
#include <libyul/AsmParser.h>
#include <libyul/AsmAnalysis.h>
#include <libyul/AssemblyStack.h>
#include <libyul/CompilabilityChecker.h>
#include <liblangutil/SourceReferenceFormatter.h>
#include <liblangutil/ErrorReporter.h>
@@ -378,6 +381,58 @@ TestCase::TestResult YulOptimizerTest::run(ostream& _stream, string const& _line
obj.analysisInfo = m_analysisInfo;
OptimiserSuite::run(*m_dialect, &meter, obj, true, solidity::frontend::OptimiserSettings::DefaultYulOptimiserSteps);
}
else if (m_optimizerStep == "stackLimitEvader")
{
yul::Object obj;
obj.code = m_object->code;
obj.analysisInfo = m_analysisInfo;
disambiguate();
StackLimitEvader::run(*m_context, obj, CompilabilityChecker{
*m_dialect,
obj,
true
}.unreachableVariables);
}
else if (m_optimizerStep == "fakeStackLimitEvader")
{
yul::Object obj;
obj.code = m_object->code;
obj.analysisInfo = m_analysisInfo;
disambiguate();
// Mark all variables with a name starting with "$" for escalation to memory.
struct FakeUnreachableGenerator: ASTWalker
{
map<YulString, set<YulString>> fakeUnreachables;
using ASTWalker::operator();
void operator()(FunctionDefinition const& _function) override
{
YulString originalFunctionName = m_currentFunction;
m_currentFunction = _function.name;
ASTWalker::operator()(_function);
m_currentFunction = originalFunctionName;
}
void visitVariableName(YulString _var)
{
if (!_var.empty() && _var.str().front() == '$')
fakeUnreachables[m_currentFunction].insert(_var);
}
void operator()(VariableDeclaration const& _varDecl) override
{
for (auto const& var: _varDecl.variables)
visitVariableName(var.name);
ASTWalker::operator()(_varDecl);
}
void operator()(Identifier const& _identifier) override
{
visitVariableName(_identifier.name);
ASTWalker::operator()(_identifier);
}
YulString m_currentFunction = YulString{};
};
FakeUnreachableGenerator fakeUnreachableGenerator;
fakeUnreachableGenerator(*obj.code);
StackLimitEvader::run(*m_context, obj, fakeUnreachableGenerator.fakeUnreachables);
}
else
{
AnsiColorized(_stream, _formatted, {formatting::BOLD, formatting::RED}) << _linePrefix << "Invalid optimizer step: " << m_optimizerStep << endl;
@@ -0,0 +1,12 @@
{
mstore(0x40, memoryguard(0x0102030405060708))
sstore(1, mload(0x40))
}
// ----
// Trace:
// Memory dump:
// 0: 0000000000000000000000000000000000000000000000000000000000000001
// 20: 0000000000000000000000000000000000000000000000000102030405060708
// 80: 0000000000000000000000000000000000000000000000000102030405060708
// Storage dump:
// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000102030405060708
@@ -0,0 +1,22 @@
{
let t := calldataload(0)
sstore(0, exp(0, t))
sstore(1, exp(1, t))
sstore(2, exp(2, t))
// The following should not be simplified
sstore(3, exp(8, t))
}
// ====
// EVMVersion: >=constantinople
// ----
// step: expressionSimplifier
//
// {
// let _1 := 0
// let t := calldataload(_1)
// sstore(_1, iszero(t))
// sstore(1, 1)
// let _8 := 2
// sstore(_8, shl(t, 1))
// sstore(3, exp(8, t))
// }
@@ -0,0 +1,62 @@
{
mstore(0x40, memoryguard(0))
function g() -> a, b {
a := 21
let $c := 1
b,a,$c := z()
}
function f() -> x {
let $x2
$x2 := 42
let $x3, $x4 := g()
x := mul(add($x2, $x3), h($x4))
sstore($x3, $x4)
}
function h(v) -> a {
let x, $z, y := z()
a, $z, v := z()
}
function z() -> a,b,c { let $x := 0 }
sstore(0, f())
let x, y := g()
}
// ----
// step: fakeStackLimitEvader
//
// {
// mstore(0x40, memoryguard(0xa0))
// function g() -> a, b
// {
// a := 21
// mstore(0x60, 1)
// let b_1, a_2, $c_3 := z()
// mstore(0x60, $c_3)
// a := a_2
// b := b_1
// }
// function f() -> x
// {
// mstore(0x20, 0)
// mstore(0x20, 42)
// let $x3_4, $x4_5 := g()
// mstore(0x00, $x4_5)
// mstore(0x40, $x3_4)
// x := mul(add(mload(0x20), mload(0x40)), h(mload(0x00)))
// sstore(mload(0x40), mload(0x00))
// }
// function h(v) -> a_1
// {
// let x_2_6, $z_7, y_8 := z()
// mstore(0x60, $z_7)
// let y := y_8
// let x_2 := x_2_6
// let a_1_9, $z_10, v_11 := z()
// mstore(0x60, $z_10)
// v := v_11
// a_1 := a_1_9
// }
// function z() -> a_3, b_4, c
// { mstore(0x80, 0) }
// sstore(0, f())
// let x_5, y_6 := g()
// }
@@ -0,0 +1,20 @@
{
mstore(0x40, memoryguard(0))
let $x := 0
sstore(0, $x)
function h($hx) -> y {
y := $hx
}
sstore(1, h(32))
}
// ----
// step: fakeStackLimitEvader
//
// {
// mstore(0x40, memoryguard(0x40))
// mstore(0x00, 0)
// sstore(0, mload(0x00))
// function h($hx) -> y
// { y := $hx }
// sstore(1, h(32))
// }
@@ -0,0 +1,13 @@
{
mstore(0x40, memoryguard(0x80))
let $x := 42
sstore(42, $x)
}
// ----
// step: fakeStackLimitEvader
//
// {
// mstore(0x40, memoryguard(0xa0))
// mstore(0x80, 42)
// sstore(42, mload(0x80))
// }
@@ -0,0 +1,88 @@
{
mstore(0x40, memoryguard(0))
function f() {
let $fx
let $fy := 42
sstore($fx, $fy)
$fx := 21
}
function g(gx) {
let $gx, $gy := tuple2()
{ $gx, $gy := tuple2() }
{ $gx, gx := tuple2() }
{ gx, $gy := tuple2() }
}
function h(hx, hy, hz, hw) {
let $hx, $hy, $hz, $hw := tuple4()
{ hx, $hy, hz, $hw := tuple4() }
{ $hx, $hy, hz, hw := tuple4() }
}
function tuple2() -> a, b {}
function tuple4() -> a, b, c, d {}
f()
g(0)
h(1, 2, 3, 4)
}
// ----
// step: fakeStackLimitEvader
//
// {
// mstore(0x40, memoryguard(0x80))
// function f()
// {
// mstore(0x40, 0)
// mstore(0x60, 42)
// sstore(mload(0x40), mload(0x60))
// mstore(0x40, 21)
// }
// function g(gx)
// {
// let $gx_1, $gy_2 := tuple2()
// mstore(0x40, $gy_2)
// mstore(0x60, $gx_1)
// {
// let $gx_3, $gy_4 := tuple2()
// mstore(0x40, $gy_4)
// mstore(0x60, $gx_3)
// }
// {
// let $gx_5, gx_6 := tuple2()
// mstore(0x60, $gx_5)
// gx := gx_6
// }
// {
// let gx_7, $gy_8 := tuple2()
// mstore(0x40, $gy_8)
// gx := gx_7
// }
// }
// function h(hx, hy, hz, hw)
// {
// let $hx_9, $hy_10, $hz_11, $hw_12 := tuple4()
// mstore(0x00, $hw_12)
// mstore(0x60, $hz_11)
// mstore(0x40, $hy_10)
// mstore(0x20, $hx_9)
// {
// let hx_13, $hy_14, hz_15, $hw_16 := tuple4()
// mstore(0x00, $hw_16)
// mstore(0x40, $hy_14)
// hz := hz_15
// hx := hx_13
// }
// {
// let $hx_17, $hy_18, hz_19, hw_20 := tuple4()
// mstore(0x40, $hy_18)
// mstore(0x20, $hx_17)
// hw := hw_20
// hz := hz_19
// }
// }
// function tuple2() -> a, b
// { }
// function tuple4() -> a_1, b_2, c, d
// { }
// f()
// g(0)
// h(1, 2, 3, 4)
// }
@@ -0,0 +1,95 @@
{
mstore(0x40, memoryguard(128))
sstore(0, g(sload(3)))
function g(x) -> v {
v := f()
}
function f() -> v {
let a1 := calldataload(mul(1,4))
let a2 := calldataload(mul(2,4))
let a3 := calldataload(mul(3,4))
let a4 := calldataload(mul(4,4))
let a5 := calldataload(mul(5,4))
let a6 := calldataload(mul(6,4))
let a7 := calldataload(mul(7,4))
let a8 := calldataload(mul(8,4))
let a9 := calldataload(mul(9,4))
a1 := calldataload(mul(0,4))
let a10 := calldataload(mul(10,4))
let a11 := calldataload(mul(11,4))
let a12 := calldataload(mul(12,4))
let a13 := calldataload(mul(13,4))
let a14 := calldataload(mul(14,4))
let a15 := calldataload(mul(15,4))
let a16 := calldataload(mul(16,4))
let a17 := calldataload(mul(17,4))
sstore(0, a1)
sstore(mul(17,4), a17)
sstore(mul(16,4), a16)
sstore(mul(15,4), a15)
sstore(mul(14,4), a14)
sstore(mul(13,4), a13)
sstore(mul(12,4), a12)
sstore(mul(11,4), a11)
sstore(mul(10,4), a10)
sstore(mul(9,4), a9)
sstore(mul(8,4), a8)
sstore(mul(7,4), a7)
sstore(mul(6,4), a6)
sstore(mul(5,4), a5)
sstore(mul(4,4), a4)
sstore(mul(3,4), a3)
sstore(mul(2,4), a2)
sstore(mul(1,4), a1)
sstore(23, g(sload(42)))
}
}
// ----
// step: stackLimitEvader
//
// {
// mstore(0x40, memoryguard(128))
// sstore(0, g(sload(3)))
// function g(x) -> v
// { v := f() }
// function f() -> v_1
// {
// let a1 := calldataload(mul(1, 4))
// let a2 := calldataload(mul(2, 4))
// let a3 := calldataload(mul(3, 4))
// let a4 := calldataload(mul(4, 4))
// let a5 := calldataload(mul(5, 4))
// let a6 := calldataload(mul(6, 4))
// let a7 := calldataload(mul(7, 4))
// let a8 := calldataload(mul(8, 4))
// let a9 := calldataload(mul(9, 4))
// a1 := calldataload(mul(0, 4))
// let a10 := calldataload(mul(10, 4))
// let a11 := calldataload(mul(11, 4))
// let a12 := calldataload(mul(12, 4))
// let a13 := calldataload(mul(13, 4))
// let a14 := calldataload(mul(14, 4))
// let a15 := calldataload(mul(15, 4))
// let a16 := calldataload(mul(16, 4))
// let a17 := calldataload(mul(17, 4))
// sstore(0, a1)
// sstore(mul(17, 4), a17)
// sstore(mul(16, 4), a16)
// sstore(mul(15, 4), a15)
// sstore(mul(14, 4), a14)
// sstore(mul(13, 4), a13)
// sstore(mul(12, 4), a12)
// sstore(mul(11, 4), a11)
// sstore(mul(10, 4), a10)
// sstore(mul(9, 4), a9)
// sstore(mul(8, 4), a8)
// sstore(mul(7, 4), a7)
// sstore(mul(6, 4), a6)
// sstore(mul(5, 4), a5)
// sstore(mul(4, 4), a4)
// sstore(mul(3, 4), a3)
// sstore(mul(2, 4), a2)
// sstore(mul(1, 4), a1)
// sstore(23, g(sload(42)))
// }
// }
@@ -0,0 +1,95 @@
{
mstore(0x40, memoryguard(128))
sstore(0, f())
function f() -> v {
let a1 := calldataload(mul(1,4))
let a2 := calldataload(mul(2,4))
let a3 := calldataload(mul(3,4))
let a4 := calldataload(mul(4,4))
let a5 := calldataload(mul(5,4))
let a6 := calldataload(mul(6,4))
let a7 := calldataload(mul(7,4))
let a8 := calldataload(mul(8,4))
let a9 := calldataload(mul(9,4))
a1 := calldataload(mul(0,4))
let a10 := calldataload(mul(10,4))
let a11 := calldataload(mul(11,4))
let a12 := calldataload(mul(12,4))
let a13 := calldataload(mul(13,4))
let a14 := calldataload(mul(14,4))
let a15 := calldataload(mul(15,4))
let a16 := calldataload(mul(16,4))
let a17 := calldataload(mul(17,4))
sstore(0, a1)
sstore(mul(17,4), a17)
sstore(mul(16,4), a16)
sstore(mul(15,4), a15)
sstore(mul(14,4), a14)
sstore(mul(13,4), a13)
sstore(mul(12,4), a12)
sstore(mul(11,4), a11)
sstore(mul(10,4), a10)
sstore(mul(9,4), a9)
sstore(mul(8,4), a8)
sstore(mul(7,4), a7)
sstore(mul(6,4), a6)
sstore(mul(5,4), a5)
sstore(mul(4,4), a4)
sstore(mul(3,4), a3)
sstore(mul(2,4), a2)
sstore(mul(1,4), a1)
sstore(23, h())
}
function h() -> v {
v := h()
}
}
// ----
// step: stackLimitEvader
//
// {
// mstore(0x40, memoryguard(0xa0))
// sstore(0, f())
// function f() -> v
// {
// mstore(0x80, calldataload(mul(1, 4)))
// let a2 := calldataload(mul(2, 4))
// let a3 := calldataload(mul(3, 4))
// let a4 := calldataload(mul(4, 4))
// let a5 := calldataload(mul(5, 4))
// let a6 := calldataload(mul(6, 4))
// let a7 := calldataload(mul(7, 4))
// let a8 := calldataload(mul(8, 4))
// let a9 := calldataload(mul(9, 4))
// mstore(0x80, calldataload(mul(0, 4)))
// let a10 := calldataload(mul(10, 4))
// let a11 := calldataload(mul(11, 4))
// let a12 := calldataload(mul(12, 4))
// let a13 := calldataload(mul(13, 4))
// let a14 := calldataload(mul(14, 4))
// let a15 := calldataload(mul(15, 4))
// let a16 := calldataload(mul(16, 4))
// let a17 := calldataload(mul(17, 4))
// sstore(0, mload(0x80))
// sstore(mul(17, 4), a17)
// sstore(mul(16, 4), a16)
// sstore(mul(15, 4), a15)
// sstore(mul(14, 4), a14)
// sstore(mul(13, 4), a13)
// sstore(mul(12, 4), a12)
// sstore(mul(11, 4), a11)
// sstore(mul(10, 4), a10)
// sstore(mul(9, 4), a9)
// sstore(mul(8, 4), a8)
// sstore(mul(7, 4), a7)
// sstore(mul(6, 4), a6)
// sstore(mul(5, 4), a5)
// sstore(mul(4, 4), a4)
// sstore(mul(3, 4), a3)
// sstore(mul(2, 4), a2)
// sstore(mul(1, 4), mload(0x80))
// sstore(23, h())
// }
// function h() -> v_1
// { v_1 := h() }
// }
@@ -0,0 +1,100 @@
{
mstore(0x40, memoryguard(128))
sstore(0, f())
function f() -> v {
let a1 := calldataload(mul(1,4))
let a2 := calldataload(mul(2,4))
let a3 := calldataload(mul(3,4))
let a4 := calldataload(mul(4,4))
let a5 := calldataload(mul(5,4))
let a6 := calldataload(mul(6,4))
let a7 := calldataload(mul(7,4))
let a8 := calldataload(mul(8,4))
let a9 := calldataload(mul(9,4))
a1 := calldataload(mul(0,4))
let a10 := calldataload(mul(10,4))
let a11 := calldataload(mul(11,4))
let a12 := calldataload(mul(12,4))
let a13 := calldataload(mul(13,4))
let a14 := calldataload(mul(14,4))
let a15 := calldataload(mul(15,4))
let a16 := calldataload(mul(16,4))
let a17 := calldataload(mul(17,4))
sstore(0, a1)
sstore(mul(17,4), a17)
sstore(mul(16,4), a16)
sstore(mul(15,4), a15)
sstore(mul(14,4), a14)
sstore(mul(13,4), a13)
sstore(mul(12,4), a12)
sstore(mul(11,4), a11)
sstore(mul(10,4), a10)
sstore(mul(9,4), a9)
sstore(mul(8,4), a8)
sstore(mul(7,4), a7)
sstore(mul(6,4), a6)
sstore(mul(5,4), a5)
sstore(mul(4,4), a4)
sstore(mul(3,4), a3)
sstore(mul(2,4), a2)
sstore(mul(1,4), a1)
sstore(23, h())
}
function h() -> v {
v := i()
}
function i() -> v {
v := h()
}
}
// ----
// step: stackLimitEvader
//
// {
// mstore(0x40, memoryguard(0xa0))
// sstore(0, f())
// function f() -> v
// {
// mstore(0x80, calldataload(mul(1, 4)))
// let a2 := calldataload(mul(2, 4))
// let a3 := calldataload(mul(3, 4))
// let a4 := calldataload(mul(4, 4))
// let a5 := calldataload(mul(5, 4))
// let a6 := calldataload(mul(6, 4))
// let a7 := calldataload(mul(7, 4))
// let a8 := calldataload(mul(8, 4))
// let a9 := calldataload(mul(9, 4))
// mstore(0x80, calldataload(mul(0, 4)))
// let a10 := calldataload(mul(10, 4))
// let a11 := calldataload(mul(11, 4))
// let a12 := calldataload(mul(12, 4))
// let a13 := calldataload(mul(13, 4))
// let a14 := calldataload(mul(14, 4))
// let a15 := calldataload(mul(15, 4))
// let a16 := calldataload(mul(16, 4))
// let a17 := calldataload(mul(17, 4))
// sstore(0, mload(0x80))
// sstore(mul(17, 4), a17)
// sstore(mul(16, 4), a16)
// sstore(mul(15, 4), a15)
// sstore(mul(14, 4), a14)
// sstore(mul(13, 4), a13)
// sstore(mul(12, 4), a12)
// sstore(mul(11, 4), a11)
// sstore(mul(10, 4), a10)
// sstore(mul(9, 4), a9)
// sstore(mul(8, 4), a8)
// sstore(mul(7, 4), a7)
// sstore(mul(6, 4), a6)
// sstore(mul(5, 4), a5)
// sstore(mul(4, 4), a4)
// sstore(mul(3, 4), a3)
// sstore(mul(2, 4), a2)
// sstore(mul(1, 4), mload(0x80))
// sstore(23, h())
// }
// function h() -> v_1
// { v_1 := i() }
// function i() -> v_2
// { v_2 := h() }
// }
@@ -0,0 +1,103 @@
{
mstore(0x40, memoryguard(128))
sstore(0, g(sload(3)))
function g(x) -> v {
switch lt(x, 3)
case 0 {
v := f()
}
case 1 {
v := g(sub(x,1))
}
}
function f() -> v {
let a1 := calldataload(mul(1,4))
let a2 := calldataload(mul(2,4))
let a3 := calldataload(mul(3,4))
let a4 := calldataload(mul(4,4))
let a5 := calldataload(mul(5,4))
let a6 := calldataload(mul(6,4))
let a7 := calldataload(mul(7,4))
let a8 := calldataload(mul(8,4))
let a9 := calldataload(mul(9,4))
a1 := calldataload(mul(0,4))
let a10 := calldataload(mul(10,4))
let a11 := calldataload(mul(11,4))
let a12 := calldataload(mul(12,4))
let a13 := calldataload(mul(13,4))
let a14 := calldataload(mul(14,4))
let a15 := calldataload(mul(15,4))
let a16 := calldataload(mul(16,4))
let a17 := calldataload(mul(17,4))
sstore(0, a1)
sstore(mul(17,4), a17)
sstore(mul(16,4), a16)
sstore(mul(15,4), a15)
sstore(mul(14,4), a14)
sstore(mul(13,4), a13)
sstore(mul(12,4), a12)
sstore(mul(11,4), a11)
sstore(mul(10,4), a10)
sstore(mul(9,4), a9)
sstore(mul(8,4), a8)
sstore(mul(7,4), a7)
sstore(mul(6,4), a6)
sstore(mul(5,4), a5)
sstore(mul(4,4), a4)
sstore(mul(3,4), a3)
sstore(mul(2,4), a2)
sstore(mul(1,4), a1)
}
}
// ----
// step: stackLimitEvader
//
// {
// mstore(0x40, memoryguard(0xa0))
// sstore(0, g(sload(3)))
// function g(x) -> v
// {
// switch lt(x, 3)
// case 0 { v := f() }
// case 1 { v := g(sub(x, 1)) }
// }
// function f() -> v_1
// {
// mstore(0x80, calldataload(mul(1, 4)))
// let a2 := calldataload(mul(2, 4))
// let a3 := calldataload(mul(3, 4))
// let a4 := calldataload(mul(4, 4))
// let a5 := calldataload(mul(5, 4))
// let a6 := calldataload(mul(6, 4))
// let a7 := calldataload(mul(7, 4))
// let a8 := calldataload(mul(8, 4))
// let a9 := calldataload(mul(9, 4))
// mstore(0x80, calldataload(mul(0, 4)))
// let a10 := calldataload(mul(10, 4))
// let a11 := calldataload(mul(11, 4))
// let a12 := calldataload(mul(12, 4))
// let a13 := calldataload(mul(13, 4))
// let a14 := calldataload(mul(14, 4))
// let a15 := calldataload(mul(15, 4))
// let a16 := calldataload(mul(16, 4))
// let a17 := calldataload(mul(17, 4))
// sstore(0, mload(0x80))
// sstore(mul(17, 4), a17)
// sstore(mul(16, 4), a16)
// sstore(mul(15, 4), a15)
// sstore(mul(14, 4), a14)
// sstore(mul(13, 4), a13)
// sstore(mul(12, 4), a12)
// sstore(mul(11, 4), a11)
// sstore(mul(10, 4), a10)
// sstore(mul(9, 4), a9)
// sstore(mul(8, 4), a8)
// sstore(mul(7, 4), a7)
// sstore(mul(6, 4), a6)
// sstore(mul(5, 4), a5)
// sstore(mul(4, 4), a4)
// sstore(mul(3, 4), a3)
// sstore(mul(2, 4), a2)
// sstore(mul(1, 4), mload(0x80))
// }
// }
@@ -0,0 +1,108 @@
{
mstore(0x40, memoryguard(128))
sstore(0, g(sload(3)))
function g(x) -> v {
switch lt(x, 3)
case 0 {
v := h(x)
}
case 1 {
v := g(sub(x,f()))
}
}
function h(x) -> v {
v := g(x)
}
function f() -> v {
let a1 := calldataload(mul(1,4))
let a2 := calldataload(mul(2,4))
let a3 := calldataload(mul(3,4))
let a4 := calldataload(mul(4,4))
let a5 := calldataload(mul(5,4))
let a6 := calldataload(mul(6,4))
let a7 := calldataload(mul(7,4))
let a8 := calldataload(mul(8,4))
let a9 := calldataload(mul(9,4))
a1 := calldataload(mul(0,4))
let a10 := calldataload(mul(10,4))
let a11 := calldataload(mul(11,4))
let a12 := calldataload(mul(12,4))
let a13 := calldataload(mul(13,4))
let a14 := calldataload(mul(14,4))
let a15 := calldataload(mul(15,4))
let a16 := calldataload(mul(16,4))
let a17 := calldataload(mul(17,4))
sstore(0, a1)
sstore(mul(17,4), a17)
sstore(mul(16,4), a16)
sstore(mul(15,4), a15)
sstore(mul(14,4), a14)
sstore(mul(13,4), a13)
sstore(mul(12,4), a12)
sstore(mul(11,4), a11)
sstore(mul(10,4), a10)
sstore(mul(9,4), a9)
sstore(mul(8,4), a8)
sstore(mul(7,4), a7)
sstore(mul(6,4), a6)
sstore(mul(5,4), a5)
sstore(mul(4,4), a4)
sstore(mul(3,4), a3)
sstore(mul(2,4), a2)
sstore(mul(1,4), a1)
}
}
// ----
// step: stackLimitEvader
//
// {
// mstore(0x40, memoryguard(0xa0))
// sstore(0, g(sload(3)))
// function g(x) -> v
// {
// switch lt(x, 3)
// case 0 { v := h(x) }
// case 1 { v := g(sub(x, f())) }
// }
// function h(x_1) -> v_2
// { v_2 := g(x_1) }
// function f() -> v_3
// {
// mstore(0x80, calldataload(mul(1, 4)))
// let a2 := calldataload(mul(2, 4))
// let a3 := calldataload(mul(3, 4))
// let a4 := calldataload(mul(4, 4))
// let a5 := calldataload(mul(5, 4))
// let a6 := calldataload(mul(6, 4))
// let a7 := calldataload(mul(7, 4))
// let a8 := calldataload(mul(8, 4))
// let a9 := calldataload(mul(9, 4))
// mstore(0x80, calldataload(mul(0, 4)))
// let a10 := calldataload(mul(10, 4))
// let a11 := calldataload(mul(11, 4))
// let a12 := calldataload(mul(12, 4))
// let a13 := calldataload(mul(13, 4))
// let a14 := calldataload(mul(14, 4))
// let a15 := calldataload(mul(15, 4))
// let a16 := calldataload(mul(16, 4))
// let a17 := calldataload(mul(17, 4))
// sstore(0, mload(0x80))
// sstore(mul(17, 4), a17)
// sstore(mul(16, 4), a16)
// sstore(mul(15, 4), a15)
// sstore(mul(14, 4), a14)
// sstore(mul(13, 4), a13)
// sstore(mul(12, 4), a12)
// sstore(mul(11, 4), a11)
// sstore(mul(10, 4), a10)
// sstore(mul(9, 4), a9)
// sstore(mul(8, 4), a8)
// sstore(mul(7, 4), a7)
// sstore(mul(6, 4), a6)
// sstore(mul(5, 4), a5)
// sstore(mul(4, 4), a4)
// sstore(mul(3, 4), a3)
// sstore(mul(2, 4), a2)
// sstore(mul(1, 4), mload(0x80))
// }
// }
@@ -0,0 +1,110 @@
{
mstore(0x40, memoryguard(128))
sstore(0, g(sload(0)))
function g(x) -> v {
switch lt(x, 3)
case 0 {
v := f()
}
case 1 {
v := g(sub(x,1))
}
}
function f() -> v {
let a1 := calldataload(mul(1,4))
let a2 := calldataload(mul(2,4))
let a3 := calldataload(mul(3,4))
let a4 := calldataload(mul(4,4))
let a5 := calldataload(mul(5,4))
let a6 := calldataload(mul(6,4))
let a7 := calldataload(mul(7,4))
let a8 := calldataload(mul(8,4))
let a9 := calldataload(mul(9,4))
a1 := calldataload(mul(0,4))
let a10 := calldataload(mul(10,4))
let a11 := calldataload(mul(11,4))
let a12 := calldataload(mul(12,4))
let a13 := calldataload(mul(13,4))
let a14 := calldataload(mul(14,4))
let a15 := calldataload(mul(15,4))
let a16 := calldataload(mul(16,4))
let a17 := calldataload(mul(17,4))
sstore(0, a1)
sstore(mul(17,4), a17)
sstore(mul(16,4), a16)
sstore(mul(15,4), a15)
sstore(mul(14,4), a14)
sstore(mul(13,4), a13)
sstore(mul(12,4), a12)
sstore(mul(11,4), a11)
sstore(mul(10,4), a10)
sstore(mul(9,4), a9)
sstore(mul(8,4), a8)
sstore(mul(7,4), a7)
sstore(mul(6,4), a6)
sstore(mul(5,4), a5)
sstore(mul(4,4), a4)
sstore(mul(3,4), a3)
sstore(mul(2,4), a2)
sstore(mul(1,4), a1)
sstore(23, h())
}
function h() -> v {
v := h()
}
}
// ----
// step: stackLimitEvader
//
// {
// mstore(0x40, memoryguard(0xa0))
// sstore(0, g(sload(0)))
// function g(x) -> v
// {
// switch lt(x, 3)
// case 0 { v := f() }
// case 1 { v := g(sub(x, 1)) }
// }
// function f() -> v_1
// {
// mstore(0x80, calldataload(mul(1, 4)))
// let a2 := calldataload(mul(2, 4))
// let a3 := calldataload(mul(3, 4))
// let a4 := calldataload(mul(4, 4))
// let a5 := calldataload(mul(5, 4))
// let a6 := calldataload(mul(6, 4))
// let a7 := calldataload(mul(7, 4))
// let a8 := calldataload(mul(8, 4))
// let a9 := calldataload(mul(9, 4))
// mstore(0x80, calldataload(mul(0, 4)))
// let a10 := calldataload(mul(10, 4))
// let a11 := calldataload(mul(11, 4))
// let a12 := calldataload(mul(12, 4))
// let a13 := calldataload(mul(13, 4))
// let a14 := calldataload(mul(14, 4))
// let a15 := calldataload(mul(15, 4))
// let a16 := calldataload(mul(16, 4))
// let a17 := calldataload(mul(17, 4))
// sstore(0, mload(0x80))
// sstore(mul(17, 4), a17)
// sstore(mul(16, 4), a16)
// sstore(mul(15, 4), a15)
// sstore(mul(14, 4), a14)
// sstore(mul(13, 4), a13)
// sstore(mul(12, 4), a12)
// sstore(mul(11, 4), a11)
// sstore(mul(10, 4), a10)
// sstore(mul(9, 4), a9)
// sstore(mul(8, 4), a8)
// sstore(mul(7, 4), a7)
// sstore(mul(6, 4), a6)
// sstore(mul(5, 4), a5)
// sstore(mul(4, 4), a4)
// sstore(mul(3, 4), a3)
// sstore(mul(2, 4), a2)
// sstore(mul(1, 4), mload(0x80))
// sstore(23, h())
// }
// function h() -> v_2
// { v_2 := h() }
// }
@@ -0,0 +1,88 @@
{
{
mstore(0x40, memoryguard(128))
sstore(0, f(0))
}
function f(a1) -> v {
let a2 := calldataload(mul(2,4))
let a3 := calldataload(mul(3,4))
let a4 := calldataload(mul(4,4))
let a5 := calldataload(mul(5,4))
let a6 := calldataload(mul(6,4))
let a7 := calldataload(mul(7,4))
let a8 := calldataload(mul(8,4))
let a9 := calldataload(mul(9,4))
let a10 := calldataload(mul(10,4))
let a11 := calldataload(mul(11,4))
let a12 := calldataload(mul(12,4))
let a13 := calldataload(mul(13,4))
let a14 := calldataload(mul(14,4))
let a15 := calldataload(mul(15,4))
let a16 := calldataload(mul(16,4))
let a17 := calldataload(mul(17,4))
sstore(0, a1)
sstore(mul(17,4), a17)
sstore(mul(16,4), a16)
sstore(mul(15,4), a15)
sstore(mul(14,4), a14)
sstore(mul(13,4), a13)
sstore(mul(12,4), a12)
sstore(mul(11,4), a11)
sstore(mul(10,4), a10)
sstore(mul(9,4), a9)
sstore(mul(8,4), a8)
sstore(mul(7,4), a7)
sstore(mul(6,4), a6)
sstore(mul(5,4), a5)
sstore(mul(4,4), a4)
sstore(mul(3,4), a3)
sstore(mul(2,4), a2)
sstore(mul(1,4), a1)
}
}
// ----
// step: stackLimitEvader
//
// {
// {
// mstore(0x40, memoryguard(0xa0))
// sstore(0, f(0))
// }
// function f(a1) -> v
// {
// let a2 := calldataload(mul(2, 4))
// let a3 := calldataload(mul(3, 4))
// let a4 := calldataload(mul(4, 4))
// let a5 := calldataload(mul(5, 4))
// let a6 := calldataload(mul(6, 4))
// let a7 := calldataload(mul(7, 4))
// let a8 := calldataload(mul(8, 4))
// let a9 := calldataload(mul(9, 4))
// let a10 := calldataload(mul(10, 4))
// let a11 := calldataload(mul(11, 4))
// let a12 := calldataload(mul(12, 4))
// let a13 := calldataload(mul(13, 4))
// let a14 := calldataload(mul(14, 4))
// let a15 := calldataload(mul(15, 4))
// let a16 := calldataload(mul(16, 4))
// let a17 := calldataload(mul(17, 4))
// sstore(0, a1)
// sstore(mul(17, 4), a17)
// sstore(mul(16, 4), a16)
// sstore(mul(15, 4), a15)
// sstore(mul(14, 4), a14)
// sstore(mul(13, 4), a13)
// sstore(mul(12, 4), a12)
// sstore(mul(11, 4), a11)
// sstore(mul(10, 4), a10)
// sstore(mul(9, 4), a9)
// sstore(mul(8, 4), a8)
// sstore(mul(7, 4), a7)
// sstore(mul(6, 4), a6)
// sstore(mul(5, 4), a5)
// sstore(mul(4, 4), a4)
// sstore(mul(3, 4), a3)
// sstore(mul(2, 4), a2)
// sstore(mul(1, 4), a1)
// }
// }
@@ -0,0 +1,98 @@
{
{
mstore(0x40, memoryguard(128))
sstore(g(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16), f())
}
function g(b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16) -> v {
// Should be, but cannot yet be escalated.
v := b16
}
function f() -> v{
let a1 := calldataload(mul(1,4))
let a2 := calldataload(mul(2,4))
let a3 := calldataload(mul(3,4))
let a4 := calldataload(mul(4,4))
let a5 := calldataload(mul(5,4))
let a6 := calldataload(mul(6,4))
let a7 := calldataload(mul(7,4))
let a8 := calldataload(mul(8,4))
let a9 := calldataload(mul(9,4))
a1 := calldataload(mul(0,4))
let a10 := calldataload(mul(10,4))
let a11 := calldataload(mul(11,4))
let a12 := calldataload(mul(12,4))
let a13 := calldataload(mul(13,4))
let a14 := calldataload(mul(14,4))
let a15 := calldataload(mul(15,4))
let a16 := calldataload(mul(16,4))
let a17 := calldataload(mul(17,4))
sstore(0, a1)
sstore(mul(17,4), a17)
sstore(mul(16,4), a16)
sstore(mul(15,4), a15)
sstore(mul(14,4), a14)
sstore(mul(13,4), a13)
sstore(mul(12,4), a12)
sstore(mul(11,4), a11)
sstore(mul(10,4), a10)
sstore(mul(9,4), a9)
sstore(mul(8,4), a8)
sstore(mul(7,4), a7)
sstore(mul(6,4), a6)
sstore(mul(5,4), a5)
sstore(mul(4,4), a4)
sstore(mul(3,4), a3)
sstore(mul(2,4), a2)
sstore(mul(1,4), a1)
}
}
// ----
// step: stackLimitEvader
//
// {
// {
// mstore(0x40, memoryguard(0xa0))
// sstore(g(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), f())
// }
// function g(b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16) -> v
// { v := b16 }
// function f() -> v_1
// {
// mstore(0x80, calldataload(mul(1, 4)))
// let a2 := calldataload(mul(2, 4))
// let a3 := calldataload(mul(3, 4))
// let a4 := calldataload(mul(4, 4))
// let a5 := calldataload(mul(5, 4))
// let a6 := calldataload(mul(6, 4))
// let a7 := calldataload(mul(7, 4))
// let a8 := calldataload(mul(8, 4))
// let a9 := calldataload(mul(9, 4))
// mstore(0x80, calldataload(mul(0, 4)))
// let a10 := calldataload(mul(10, 4))
// let a11 := calldataload(mul(11, 4))
// let a12 := calldataload(mul(12, 4))
// let a13 := calldataload(mul(13, 4))
// let a14 := calldataload(mul(14, 4))
// let a15 := calldataload(mul(15, 4))
// let a16 := calldataload(mul(16, 4))
// let a17 := calldataload(mul(17, 4))
// sstore(0, mload(0x80))
// sstore(mul(17, 4), a17)
// sstore(mul(16, 4), a16)
// sstore(mul(15, 4), a15)
// sstore(mul(14, 4), a14)
// sstore(mul(13, 4), a13)
// sstore(mul(12, 4), a12)
// sstore(mul(11, 4), a11)
// sstore(mul(10, 4), a10)
// sstore(mul(9, 4), a9)
// sstore(mul(8, 4), a8)
// sstore(mul(7, 4), a7)
// sstore(mul(6, 4), a6)
// sstore(mul(5, 4), a5)
// sstore(mul(4, 4), a4)
// sstore(mul(3, 4), a3)
// sstore(mul(2, 4), a2)
// sstore(mul(1, 4), mload(0x80))
// }
// }
@@ -0,0 +1,339 @@
{
{
mstore(0x40, memoryguard(128))
sstore(23, f())
}
function f() -> v{
let a1 := calldataload(mul(1,4))
let a2 := calldataload(mul(2,4))
let a3 := calldataload(mul(3,4))
let a4 := calldataload(g())
let a5 := calldataload(mul(5,4))
let a6 := calldataload(mul(6,4))
let a7 := calldataload(mul(7,4))
let a8 := calldataload(mul(8,4))
let a9 := calldataload(mul(9,4))
a1 := calldataload(mul(0,4))
let a10 := calldataload(mul(10,4))
let a11 := calldataload(mul(11,4))
let a12 := calldataload(mul(12,4))
let a13 := calldataload(mul(13,4))
let a14 := calldataload(mul(14,4))
let a15 := calldataload(mul(15,4))
let a16 := calldataload(mul(16,4))
let a17 := calldataload(mul(17,4))
sstore(0, a1)
sstore(mul(17,4), a17)
sstore(mul(16,4), a16)
sstore(mul(15,4), a15)
sstore(mul(14,4), a14)
sstore(mul(13,4), a13)
sstore(mul(12,4), a12)
sstore(mul(11,4), a11)
sstore(mul(10,4), a10)
sstore(mul(9,4), a9)
sstore(mul(8,h()), a8)
sstore(mul(7,4), a7)
sstore(mul(6,4), a6)
sstore(mul(5,4), a5)
sstore(mul(4,4), a4)
sstore(mul(3,4), a3)
sstore(mul(2,4), a2)
sstore(mul(1,4), a1)
}
function g() -> v {
let a1 := calldataload(mul(1,4))
let a2 := calldataload(mul(2,4))
let a3 := calldataload(mul(3,4))
let a4 := calldataload(mul(4,4))
let a5 := calldataload(mul(5,4))
let a6 := calldataload(mul(6,4))
let a7 := calldataload(mul(7,4))
let a8 := calldataload(mul(8,4))
let a9 := calldataload(mul(9,4))
a1 := calldataload(mul(0,4))
let a10 := calldataload(mul(10,4))
let a11 := calldataload(mul(11,4))
let a12 := calldataload(mul(12,4))
let a13 := calldataload(mul(13,4))
let a14 := calldataload(mul(14,4))
let a15 := calldataload(mul(15,4))
let a16 := calldataload(mul(16,4))
let a17 := calldataload(mul(17,4))
sstore(0, a1)
sstore(mul(17,4), a17)
sstore(mul(16,4), a16)
sstore(mul(15,4), a15)
sstore(mul(14,4), a14)
sstore(mul(13,4), a13)
sstore(mul(12,4), a12)
sstore(mul(11,4), a11)
sstore(mul(10,4), a10)
sstore(mul(9,4), a9)
sstore(mul(8,4), a8)
sstore(mul(7,4), a7)
sstore(mul(6,4), a6)
sstore(mul(5,4), a5)
sstore(mul(4,4), a4)
sstore(mul(3,4), a3)
sstore(mul(2,4), a2)
sstore(mul(1,4), a1)
v := i()
}
function h() -> v {
let a1 := calldataload(mul(1,4))
let a2 := calldataload(mul(2,4))
let a3 := calldataload(mul(3,4))
let a4 := calldataload(mul(4,4))
let a5 := calldataload(mul(5,4))
let a6 := calldataload(mul(6,4))
let a7 := calldataload(mul(7,4))
let a8 := calldataload(mul(8,4))
let a9 := calldataload(mul(9,4))
let a10 := calldataload(mul(10,4))
let a11 := calldataload(mul(10,4))
a1 := calldataload(mul(0,4))
a2 := calldataload(mul(1,4))
let a12 := calldataload(mul(12,4))
let a13 := calldataload(mul(13,4))
let a14 := calldataload(mul(14,4))
let a15 := calldataload(mul(15,4))
let a16 := calldataload(mul(16,4))
let a17 := calldataload(mul(17,4))
let a18 := calldataload(mul(18,4))
let a19 := calldataload(mul(19,4))
sstore(0, add(a1, a2))
sstore(mul(17,4), a19)
sstore(mul(17,4), a18)
sstore(mul(17,4), a17)
sstore(mul(16,4), a16)
sstore(mul(15,4), a15)
sstore(mul(14,4), a14)
sstore(mul(13,4), a13)
sstore(mul(12,4), a12)
sstore(mul(11,4), a11)
sstore(mul(10,4), a10)
sstore(mul(9,4), a9)
sstore(mul(8,4), a8)
sstore(mul(7,4), a7)
sstore(mul(6,4), a6)
sstore(mul(5,4), a5)
sstore(mul(4,4), a4)
sstore(mul(3,4), a3)
sstore(mul(2,4), a2)
sstore(mul(1,4), a1)
v := i()
}
function i() -> v {
let a1 := calldataload(mul(1,4))
let a2 := calldataload(mul(2,4))
let a3 := calldataload(mul(3,4))
let a4 := calldataload(mul(4,4))
let a5 := calldataload(mul(5,4))
let a6 := calldataload(mul(6,4))
let a7 := calldataload(mul(7,4))
let a8 := calldataload(mul(8,4))
let a9 := calldataload(mul(9,4))
a1 := calldataload(mul(0,4))
let a10 := calldataload(mul(10,4))
let a11 := calldataload(mul(11,4))
let a12 := calldataload(mul(12,4))
let a13 := calldataload(mul(13,4))
let a14 := calldataload(mul(14,4))
let a15 := calldataload(mul(15,4))
let a16 := calldataload(mul(16,4))
let a17 := calldataload(mul(17,4))
sstore(0, a1)
sstore(mul(17,4), a17)
sstore(mul(16,4), a16)
sstore(mul(15,4), a15)
sstore(mul(14,4), a14)
sstore(mul(13,4), a13)
sstore(mul(12,4), a12)
sstore(mul(11,4), a11)
sstore(mul(10,4), a10)
sstore(mul(9,4), a9)
sstore(mul(8,4), a8)
sstore(mul(7,4), a7)
sstore(mul(6,4), a6)
sstore(mul(5,4), a5)
sstore(mul(4,4), a4)
sstore(mul(3,4), a3)
sstore(mul(2,4), a2)
sstore(mul(1,4), a1)
v := sload(mul(42,8))
}
}
// ----
// step: stackLimitEvader
//
// {
// {
// mstore(0x40, memoryguard(0x0100))
// sstore(23, f())
// }
// function f() -> v
// {
// mstore(0x80, calldataload(mul(1, 4)))
// let a2 := calldataload(mul(2, 4))
// let a3 := calldataload(mul(3, 4))
// let a4 := calldataload(g())
// let a5 := calldataload(mul(5, 4))
// let a6 := calldataload(mul(6, 4))
// let a7 := calldataload(mul(7, 4))
// let a8 := calldataload(mul(8, 4))
// let a9 := calldataload(mul(9, 4))
// mstore(0x80, calldataload(mul(0, 4)))
// let a10 := calldataload(mul(10, 4))
// let a11 := calldataload(mul(11, 4))
// let a12 := calldataload(mul(12, 4))
// let a13 := calldataload(mul(13, 4))
// let a14 := calldataload(mul(14, 4))
// let a15 := calldataload(mul(15, 4))
// let a16 := calldataload(mul(16, 4))
// let a17 := calldataload(mul(17, 4))
// sstore(0, mload(0x80))
// sstore(mul(17, 4), a17)
// sstore(mul(16, 4), a16)
// sstore(mul(15, 4), a15)
// sstore(mul(14, 4), a14)
// sstore(mul(13, 4), a13)
// sstore(mul(12, 4), a12)
// sstore(mul(11, 4), a11)
// sstore(mul(10, 4), a10)
// sstore(mul(9, 4), a9)
// sstore(mul(8, h()), a8)
// sstore(mul(7, 4), a7)
// sstore(mul(6, 4), a6)
// sstore(mul(5, 4), a5)
// sstore(mul(4, 4), a4)
// sstore(mul(3, 4), a3)
// sstore(mul(2, 4), a2)
// sstore(mul(1, 4), mload(0x80))
// }
// function g() -> v_1
// {
// mstore(0xc0, calldataload(mul(1, 4)))
// let a2_3 := calldataload(mul(2, 4))
// let a3_4 := calldataload(mul(3, 4))
// let a4_5 := calldataload(mul(4, 4))
// let a5_6 := calldataload(mul(5, 4))
// let a6_7 := calldataload(mul(6, 4))
// let a7_8 := calldataload(mul(7, 4))
// let a8_9 := calldataload(mul(8, 4))
// let a9_10 := calldataload(mul(9, 4))
// mstore(0xc0, calldataload(mul(0, 4)))
// let a10_11 := calldataload(mul(10, 4))
// let a11_12 := calldataload(mul(11, 4))
// let a12_13 := calldataload(mul(12, 4))
// let a13_14 := calldataload(mul(13, 4))
// let a14_15 := calldataload(mul(14, 4))
// let a15_16 := calldataload(mul(15, 4))
// let a16_17 := calldataload(mul(16, 4))
// let a17_18 := calldataload(mul(17, 4))
// sstore(0, mload(0xc0))
// sstore(mul(17, 4), a17_18)
// sstore(mul(16, 4), a16_17)
// sstore(mul(15, 4), a15_16)
// sstore(mul(14, 4), a14_15)
// sstore(mul(13, 4), a13_14)
// sstore(mul(12, 4), a12_13)
// sstore(mul(11, 4), a11_12)
// sstore(mul(10, 4), a10_11)
// sstore(mul(9, 4), a9_10)
// sstore(mul(8, 4), a8_9)
// sstore(mul(7, 4), a7_8)
// sstore(mul(6, 4), a6_7)
// sstore(mul(5, 4), a5_6)
// sstore(mul(4, 4), a4_5)
// sstore(mul(3, 4), a3_4)
// sstore(mul(2, 4), a2_3)
// sstore(mul(1, 4), mload(0xc0))
// v_1 := i()
// }
// function h() -> v_19
// {
// mstore(0xa0, calldataload(mul(1, 4)))
// mstore(0xc0, calldataload(mul(2, 4)))
// let a3_22 := calldataload(mul(3, 4))
// let a4_23 := calldataload(mul(4, 4))
// let a5_24 := calldataload(mul(5, 4))
// let a6_25 := calldataload(mul(6, 4))
// let a7_26 := calldataload(mul(7, 4))
// let a8_27 := calldataload(mul(8, 4))
// let a9_28 := calldataload(mul(9, 4))
// let a10_29 := calldataload(mul(10, 4))
// let a11_30 := calldataload(mul(10, 4))
// mstore(0xa0, calldataload(mul(0, 4)))
// mstore(0xc0, calldataload(mul(1, 4)))
// let a12_31 := calldataload(mul(12, 4))
// let a13_32 := calldataload(mul(13, 4))
// let a14_33 := calldataload(mul(14, 4))
// let a15_34 := calldataload(mul(15, 4))
// let a16_35 := calldataload(mul(16, 4))
// let a17_36 := calldataload(mul(17, 4))
// let a18 := calldataload(mul(18, 4))
// let a19 := calldataload(mul(19, 4))
// sstore(0, add(mload(0xa0), mload(0xc0)))
// sstore(mul(17, 4), a19)
// sstore(mul(17, 4), a18)
// sstore(mul(17, 4), a17_36)
// sstore(mul(16, 4), a16_35)
// sstore(mul(15, 4), a15_34)
// sstore(mul(14, 4), a14_33)
// sstore(mul(13, 4), a13_32)
// sstore(mul(12, 4), a12_31)
// sstore(mul(11, 4), a11_30)
// sstore(mul(10, 4), a10_29)
// sstore(mul(9, 4), a9_28)
// sstore(mul(8, 4), a8_27)
// sstore(mul(7, 4), a7_26)
// sstore(mul(6, 4), a6_25)
// sstore(mul(5, 4), a5_24)
// sstore(mul(4, 4), a4_23)
// sstore(mul(3, 4), a3_22)
// sstore(mul(2, 4), mload(0xc0))
// sstore(mul(1, 4), mload(0xa0))
// v_19 := i()
// }
// function i() -> v_37
// {
// mstore(0xe0, calldataload(mul(1, 4)))
// let a2_39 := calldataload(mul(2, 4))
// let a3_40 := calldataload(mul(3, 4))
// let a4_41 := calldataload(mul(4, 4))
// let a5_42 := calldataload(mul(5, 4))
// let a6_43 := calldataload(mul(6, 4))
// let a7_44 := calldataload(mul(7, 4))
// let a8_45 := calldataload(mul(8, 4))
// let a9_46 := calldataload(mul(9, 4))
// mstore(0xe0, calldataload(mul(0, 4)))
// let a10_47 := calldataload(mul(10, 4))
// let a11_48 := calldataload(mul(11, 4))
// let a12_49 := calldataload(mul(12, 4))
// let a13_50 := calldataload(mul(13, 4))
// let a14_51 := calldataload(mul(14, 4))
// let a15_52 := calldataload(mul(15, 4))
// let a16_53 := calldataload(mul(16, 4))
// let a17_54 := calldataload(mul(17, 4))
// sstore(0, mload(0xe0))
// sstore(mul(17, 4), a17_54)
// sstore(mul(16, 4), a16_53)
// sstore(mul(15, 4), a15_52)
// sstore(mul(14, 4), a14_51)
// sstore(mul(13, 4), a13_50)
// sstore(mul(12, 4), a12_49)
// sstore(mul(11, 4), a11_48)
// sstore(mul(10, 4), a10_47)
// sstore(mul(9, 4), a9_46)
// sstore(mul(8, 4), a8_45)
// sstore(mul(7, 4), a7_44)
// sstore(mul(6, 4), a6_43)
// sstore(mul(5, 4), a5_42)
// sstore(mul(4, 4), a4_41)
// sstore(mul(3, 4), a3_40)
// sstore(mul(2, 4), a2_39)
// sstore(mul(1, 4), mload(0xe0))
// v_37 := sload(mul(42, 8))
// }
// }
+1 -1
View File
@@ -77,7 +77,7 @@ bool IsolTestOptions::parse(int _argc, char const* const* _argv)
void IsolTestOptions::validate() const
{
static std::string filterString{"[a-zA-Z1-9_/*]*"};
static std::string filterString{"[a-zA-Z0-9_/*]*"};
static std::regex filterExpression{filterString};
assertThrow(
regex_match(testFilter, filterExpression),