Fix use of uninitialized functions stored in storage.

This commit is contained in:
chriseth
2019-04-25 15:40:48 +02:00
parent eac0048176
commit 5b991c1e59
8 changed files with 150 additions and 0 deletions
+8
View File
@@ -1143,6 +1143,14 @@ void CompilerUtils::pushZeroValue(Type const& _type)
m_context << m_context.lowLevelFunctionTag("$invalidFunction", 0, 0, [](CompilerContext& _context) {
_context.appendInvalid();
});
if (CompilerContext* runCon = m_context.runtimeContext())
{
leftShiftNumberOnStack(32);
m_context << runCon->lowLevelFunctionTag("$invalidFunction", 0, 0, [](CompilerContext& _context) {
_context.appendInvalid();
}).toSubAssemblyTag(m_context.runtimeSub());
m_context << Instruction::OR;
}
return;
}
}