mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #6034 from ethereum/fuzzcrash
Fix crash due to missing type info
This commit is contained in:
commit
c5577145d3
@ -12,6 +12,7 @@ Bugfixes:
|
|||||||
* ABIEncoderV2: Fix internal error related to bare delegatecall.
|
* ABIEncoderV2: Fix internal error related to bare delegatecall.
|
||||||
* ABIEncoderV2: Fix internal error related to ecrecover.
|
* ABIEncoderV2: Fix internal error related to ecrecover.
|
||||||
* ABIEncoderV2: Fix internal error related to mappings as library parameters.
|
* ABIEncoderV2: Fix internal error related to mappings as library parameters.
|
||||||
|
* SMTChecker: Fixed crash when used with fixed-sized arrays.
|
||||||
* Yul: Properly detect name clashes with functions before their declaration.
|
* Yul: Properly detect name clashes with functions before their declaration.
|
||||||
|
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ void ReferencesResolver::endVisit(ArrayTypeName const& _typeName)
|
|||||||
fatalTypeError(_typeName.baseType().location(), "Illegal base type of storage size zero for array.");
|
fatalTypeError(_typeName.baseType().location(), "Illegal base type of storage size zero for array.");
|
||||||
if (Expression const* length = _typeName.length())
|
if (Expression const* length = _typeName.length())
|
||||||
{
|
{
|
||||||
TypePointer lengthTypeGeneric = length->annotation().type;
|
TypePointer& lengthTypeGeneric = length->annotation().type;
|
||||||
if (!lengthTypeGeneric)
|
if (!lengthTypeGeneric)
|
||||||
lengthTypeGeneric = ConstantEvaluator(m_errorReporter).evaluate(*length);
|
lengthTypeGeneric = ConstantEvaluator(m_errorReporter).evaluate(*length);
|
||||||
RationalNumberType const* lengthType = dynamic_cast<RationalNumberType const*>(lengthTypeGeneric.get());
|
RationalNumberType const* lengthType = dynamic_cast<RationalNumberType const*>(lengthTypeGeneric.get());
|
||||||
|
8
test/libsolidity/smtCheckerTests/simple/static_array.sol
Normal file
8
test/libsolidity/smtCheckerTests/simple/static_array.sol
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
pragma experimental SMTChecker;
|
||||||
|
contract C
|
||||||
|
{
|
||||||
|
// Used to crash because Literal had no type
|
||||||
|
int[3] d;
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Warning: (92-100): Assertion checker does not yet support the type of this variable.
|
Loading…
Reference in New Issue
Block a user