mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Change translation of implicit throws (issue #1589).
This adds a new invalid instruction that is used for encoding implicit throws that are emitted by the compiler. This makes it possible to distinguish such runtime errors from user-provided, explicit throws.
This commit is contained in:
committed by
chriseth
parent
102fd7ee5d
commit
9bcbd93ac5
@@ -901,7 +901,7 @@ void ArrayUtils::accessIndex(ArrayType const& _arrayType, bool _doBoundsCheck) c
|
||||
// check out-of-bounds access
|
||||
m_context << Instruction::DUP2 << Instruction::LT << Instruction::ISZERO;
|
||||
// out-of-bounds access throws exception
|
||||
m_context.appendConditionalJumpTo(m_context.errorTag());
|
||||
m_context.appendConditionalInvalid();
|
||||
}
|
||||
if (location == DataLocation::CallData && _arrayType.isDynamicallySized())
|
||||
// remove length if present
|
||||
|
||||
Reference in New Issue
Block a user