mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
yulInterpreter: Add timeout based on the number of interpreted statements.
This commit is contained in:
@@ -128,6 +128,12 @@ void Interpreter::operator()(Continue const&)
|
||||
|
||||
void Interpreter::operator()(Block const& _block)
|
||||
{
|
||||
m_state.numSteps++;
|
||||
if (m_state.maxSteps > 0 && m_state.numSteps >= m_state.maxSteps)
|
||||
{
|
||||
m_state.trace.emplace_back("Interpreter execution step limit reached.");
|
||||
throw InterpreterTerminated();
|
||||
}
|
||||
openScope();
|
||||
// Register functions.
|
||||
for (auto const& statement: _block.statements)
|
||||
|
||||
Reference in New Issue
Block a user