Skip to content

Commit

Permalink
Fix stack-use-after-scope in Functionalizer call
Browse files Browse the repository at this point in the history
  • Loading branch information
r0qs committed Feb 4, 2025
1 parent b147767 commit aa2fa7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libevmasm/Assembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,11 @@ void Assembly::assemblyStream(
f.feed(i, _debugInfoSelection);
f.flush();

std::string const codeSectionPrefix = _prefix + " ";
for (size_t i = 1; i < m_codeSections.size(); ++i)
{
_out << std::endl << _prefix << "code_section_" << i << ": assembly {\n";
Functionalizer codeSectionF(_out, _prefix + " ", _sourceCodes, *this);
Functionalizer codeSectionF(_out, codeSectionPrefix, _sourceCodes, *this);
for (auto const& item: m_codeSections[i].items)
codeSectionF.feed(item, _debugInfoSelection);
codeSectionF.flush();
Expand Down

0 comments on commit aa2fa7e

Please sign in to comment.