diff options
author | chriseth <chris@ethereum.org> | 2016-12-03 08:08:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-03 08:08:45 +0800 |
commit | 9be2fb12bd4ff8b4109db67a236642a9d3b2fc15 (patch) | |
tree | b914f7c105b618c48e6da10a46cc7572fcd44203 /libsolidity/codegen | |
parent | 3a01a87afe3468421f31aa5097796dcc88e37e26 (diff) | |
parent | 86d54c02cdebba32a6a8fba1d74bad17667d46cd (diff) | |
download | dexon-solidity-9be2fb12bd4ff8b4109db67a236642a9d3b2fc15.tar dexon-solidity-9be2fb12bd4ff8b4109db67a236642a9d3b2fc15.tar.gz dexon-solidity-9be2fb12bd4ff8b4109db67a236642a9d3b2fc15.tar.bz2 dexon-solidity-9be2fb12bd4ff8b4109db67a236642a9d3b2fc15.tar.lz dexon-solidity-9be2fb12bd4ff8b4109db67a236642a9d3b2fc15.tar.xz dexon-solidity-9be2fb12bd4ff8b4109db67a236642a9d3b2fc15.tar.zst dexon-solidity-9be2fb12bd4ff8b4109db67a236642a9d3b2fc15.zip |
Merge pull request #1475 from ethereum/fail-on-identity-fail
Throw if calling the identity precompile (memoryCopy) failed
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r-- | libsolidity/codegen/CompilerUtils.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libsolidity/codegen/CompilerUtils.cpp b/libsolidity/codegen/CompilerUtils.cpp index d5361ac6..a8299626 100644 --- a/libsolidity/codegen/CompilerUtils.cpp +++ b/libsolidity/codegen/CompilerUtils.cpp @@ -312,7 +312,8 @@ void CompilerUtils::memoryCopy() m_context << Instruction::DIV << u256(c_identityWordGas) << Instruction::MUL; m_context << u256(c_identityGas) << Instruction::ADD; m_context << Instruction::CALL; - m_context << Instruction::POP; // ignore return value + m_context << Instruction::ISZERO; + m_context.appendConditionalJumpTo(m_context.errorTag()); } void CompilerUtils::splitExternalFunctionType(bool _leftAligned) |