diff options
author | chriseth <c@ethdev.com> | 2015-08-21 02:02:38 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-08-21 02:02:38 +0800 |
commit | 4128b04253f2a0b93548afae0342edba44a0bd66 (patch) | |
tree | 547498e7ecea1c3d964de1aa1667c7c27a84eafe | |
parent | 289b8146703521943e6106e5d3f178deb0117652 (diff) | |
download | dexon-solidity-4128b04253f2a0b93548afae0342edba44a0bd66.tar.gz dexon-solidity-4128b04253f2a0b93548afae0342edba44a0bd66.tar.zst dexon-solidity-4128b04253f2a0b93548afae0342edba44a0bd66.zip |
Propagate exceptions in clone calls.
-rw-r--r-- | libsolidity/Compiler.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libsolidity/Compiler.cpp b/libsolidity/Compiler.cpp index f0d1b38e..f7bcd50c 100644 --- a/libsolidity/Compiler.cpp +++ b/libsolidity/Compiler.cpp @@ -720,6 +720,9 @@ eth::Assembly Compiler::getCloneRuntime() a << u256("0xcafecafecafecafecafecafecafecafecafecafe"); a << u256(eth::c_callGas + eth::c_callValueTransferGas + 10) << eth::Instruction::GAS << eth::Instruction::SUB; a << eth::Instruction::CALLCODE; + //Propagate error condition (if CALLCODE pushes 0 on stack). + a << eth::Instruction::ISZERO; + a.appendJumpI(a.errorTag()); //@todo adjust for larger return values, make this dynamic. a << u256(0x20) << u256(0) << eth::Instruction::RETURN; return a; |