Merge pull request #6034 from ethereum/fuzzcrash

Fix crash due to missing type info
This commit is contained in:
chriseth 2019-02-19 17:57:39 +01:00 committed by GitHub
commit c5577145d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View File

@ -12,6 +12,7 @@ Bugfixes:
* ABIEncoderV2: Fix internal error related to bare delegatecall.
* ABIEncoderV2: Fix internal error related to ecrecover.
* 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.

View File

@ -246,7 +246,7 @@ void ReferencesResolver::endVisit(ArrayTypeName const& _typeName)
fatalTypeError(_typeName.baseType().location(), "Illegal base type of storage size zero for array.");
if (Expression const* length = _typeName.length())
{
TypePointer lengthTypeGeneric = length->annotation().type;
TypePointer& lengthTypeGeneric = length->annotation().type;
if (!lengthTypeGeneric)
lengthTypeGeneric = ConstantEvaluator(m_errorReporter).evaluate(*length);
RationalNumberType const* lengthType = dynamic_cast<RationalNumberType const*>(lengthTypeGeneric.get());

View 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.