Skip to content

Commit

Permalink
eof: Add solAssert checking that stack height does not go negative.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodiazet committed Dec 13, 2024
1 parent 4c342e8 commit 37742f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libyul/backends/evm/NoOutputAssembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ void NoOutputAssembly::appendFunctionCall(FunctionID _functionID)
{
auto [args, rets] = m_context.functionSignatures.at(_functionID);
m_stackHeight += static_cast<int>(rets) - static_cast<int>(args);
solAssert(m_stackHeight >= 0);
}

void NoOutputAssembly::appendFunctionReturn()
Expand Down

0 comments on commit 37742f1

Please sign in to comment.