mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disable calldata and return data copy, self destruct.
This commit is contained in:
parent
058e871ce2
commit
d2f864916c
@ -131,7 +131,7 @@ DEFINE_PROTO_FUZZER(Program const& _input)
|
||||
EVMDialect::strictAssemblyForEVMObjects(version)
|
||||
);
|
||||
// HACK: Force this to fake stack limit evader for now
|
||||
string step = "fakeStackLimitEvader";
|
||||
string step = "stackLimitEvader";
|
||||
optimizerTest.setStep(step);
|
||||
// optimizerTest.setStep(optimizerTest.randomOptimiserStep(_input.step()));
|
||||
shared_ptr<solidity::yul::Block> astBlock = optimizerTest.run();
|
||||
@ -190,6 +190,6 @@ DEFINE_PROTO_FUZZER(Program const& _input)
|
||||
}
|
||||
solAssert(
|
||||
unoptimizedState.str() == optimizedState.str(),
|
||||
"State of unoptimised and optimised stack reused code do not match."
|
||||
"State of unoptimised and optimised stack saver code do not match."
|
||||
);
|
||||
}
|
||||
|
@ -757,7 +757,10 @@ void ProtoConverter::visit(CopyFunc const& _x)
|
||||
|
||||
// Code copy may change state if e.g., some byte of code
|
||||
// is stored to storage via a sequence of mload and sstore.
|
||||
if (m_filterStatefulInstructions && type == CopyFunc::CODE)
|
||||
if (
|
||||
m_filterStatefulInstructions &&
|
||||
(type == CopyFunc::CODE || type == CopyFunc::CALLDATA || type == CopyFunc::RETURNDATA)
|
||||
)
|
||||
return;
|
||||
|
||||
switch (type)
|
||||
@ -1285,7 +1288,8 @@ void ProtoConverter::visit(TerminatingStmt const& _x)
|
||||
visit(_x.ret_rev());
|
||||
break;
|
||||
case TerminatingStmt::kSelfDes:
|
||||
visit(_x.self_des());
|
||||
if (!m_filterStatefulInstructions)
|
||||
visit(_x.self_des());
|
||||
break;
|
||||
case TerminatingStmt::TERM_ONEOF_NOT_SET:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user