Merge pull request #12203 from ethereum/fixuseafterfreeside

Fix use-after-free bug.
This commit is contained in:
chriseth 2021-10-27 16:43:44 +02:00 committed by GitHub
commit 7ebf71f315
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,7 +212,8 @@ ControlFlowSideEffectsCollector::ControlFlowSideEffectsCollector(
if (calledSideEffects->canRevert)
sideEffects.canRevert = true;
for (YulString callee: util::valueOrDefault(m_functionCalls, _function))
set<YulString> emptySet;
for (YulString callee: util::valueOrDefault(m_functionCalls, _function, emptySet))
_recurse(callee, _recurse);
};
for (auto const& call: calls)