mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #8420 from mijovic/iceStackTooDeepFix
Throwing stack too deep ICE in case of calling encode with too many a…
This commit is contained in:
commit
9318dae42c
@ -539,6 +539,10 @@ void CompilerUtils::encodeToMemory(
|
||||
if (targetType->isDynamicallySized() && !_copyDynamicDataInPlace)
|
||||
{
|
||||
// copy tail pointer (=mem_end - mem_start) to memory
|
||||
solAssert(
|
||||
(2 + dynPointers) <= 16,
|
||||
"Stack too deep(" + to_string(2 + dynPointers) + "), try using fewer variables."
|
||||
);
|
||||
m_context << dupInstruction(2 + dynPointers) << Instruction::DUP2;
|
||||
m_context << Instruction::SUB;
|
||||
m_context << dupInstruction(2 + dynPointers - thisDynPointer);
|
||||
|
Loading…
Reference in New Issue
Block a user