diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-02 09:29:24 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-02 19:39:29 +0800 |
commit | ba0015cf256b3cf5f90a0daf225072286d8d3da4 (patch) | |
tree | dcc58a450bc91b92a1b25973b8147435ba00b80c | |
parent | 7ec3dd9bbc9f212b6f631db0e42fde47de091c63 (diff) | |
download | dexon-solidity-ba0015cf256b3cf5f90a0daf225072286d8d3da4.tar dexon-solidity-ba0015cf256b3cf5f90a0daf225072286d8d3da4.tar.gz dexon-solidity-ba0015cf256b3cf5f90a0daf225072286d8d3da4.tar.bz2 dexon-solidity-ba0015cf256b3cf5f90a0daf225072286d8d3da4.tar.lz dexon-solidity-ba0015cf256b3cf5f90a0daf225072286d8d3da4.tar.xz dexon-solidity-ba0015cf256b3cf5f90a0daf225072286d8d3da4.tar.zst dexon-solidity-ba0015cf256b3cf5f90a0daf225072286d8d3da4.zip |
Warn early when exhausting stack
-rw-r--r-- | libsolidity/codegen/CompilerUtils.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libsolidity/codegen/CompilerUtils.cpp b/libsolidity/codegen/CompilerUtils.cpp index 9f019d27..42323abd 100644 --- a/libsolidity/codegen/CompilerUtils.cpp +++ b/libsolidity/codegen/CompilerUtils.cpp @@ -200,6 +200,7 @@ void CompilerUtils::encodeToMemory( // leave end_of_mem as dyn head pointer m_context << Instruction::DUP1 << u256(32) << Instruction::ADD; dynPointers++; + solAssert((argSize + dynPointers) < 16, "Stack too deep, try using less variables."); } else { |