mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
f15cad360901b4cad3955b8da53d24a882e0e46f
3633 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
74ff4dad81 | Merge remote-tracking branch 'upstream/master' into SR-755-linux-fatal-stacktrace-symbolication | ||
|
|
ddee21448d |
[swiftc (68 vs. 5162)] Add crasher in swift::TypeChecker::validateDecl(...)
Add test case for crash triggered in `swift::TypeChecker::validateDecl(...)`. Current number of unresolved compiler crashers: 68 (5162 resolved) Assertion failure in [`include/swift/AST/DiagnosticEngine.h (line 614)`](https://github.com/apple/swift/blob/master/include/swift/AST/DiagnosticEngine.h#L614): ``` Assertion `!ActiveDiagnostic && "Already have an active diagnostic"' failed. When executing: swift::InFlightDiagnostic swift::DiagnosticEngine::diagnose(swift::SourceLoc, Diag<ArgTypes...>, typename detail::PassArgument<ArgTypes>::type...) [ArgTypes = <swift::Identifier>] ``` Assertion context: ``` /// the types expected by the diagnostic \p ID. template<typename ...ArgTypes> InFlightDiagnostic diagnose(SourceLoc Loc, Diag<ArgTypes...> ID, typename detail::PassArgument<ArgTypes>::type... Args) { assert(!ActiveDiagnostic && "Already have an active diagnostic"); ActiveDiagnostic = Diagnostic(ID, std::move(Args)...); ActiveDiagnostic->setLoc(Loc); return InFlightDiagnostic(*this); } ``` Stack trace: ``` swift: /path/to/swift/include/swift/AST/DiagnosticEngine.h:614: swift::InFlightDiagnostic swift::DiagnosticEngine::diagnose(swift::SourceLoc, Diag<ArgTypes...>, typename detail::PassArgument<ArgTypes>::type...) [ArgTypes = <swift::Identifier>]: Assertion `!ActiveDiagnostic && "Already have an active diagnostic"' failed. 9 swift 0x0000000000eda3e1 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3905 10 swift 0x000000000115029b swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2667 11 swift 0x000000000114eabe swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 4990 12 swift 0x0000000000f1e153 swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 99 15 swift 0x0000000000f51cb2 swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 162 17 swift 0x0000000000f52d54 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 18 swift 0x0000000000f514e3 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 195 21 swift 0x0000000000eda1e2 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3394 22 swift 0x000000000115029b swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2667 23 swift 0x0000000000f1eed1 swift::TypeChecker::lookupMemberType(swift::DeclContext*, swift::Type, swift::Identifier, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 289 24 swift 0x0000000000fdd1ad swift::constraints::ConstraintSystem::performMemberLookup(swift::constraints::ConstraintKind, swift::DeclName, swift::Type, swift::FunctionRefKind, swift::constraints::ConstraintLocator*, bool) + 2413 25 swift 0x0000000000fdef9b swift::constraints::ConstraintSystem::simplifyMemberConstraint(swift::constraints::Constraint const&) + 491 26 swift 0x0000000000fe0105 swift::constraints::ConstraintSystem::simplifyConstraint(swift::constraints::Constraint const&) + 69 27 swift 0x0000000000fea7db swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 12235 28 swift 0x0000000000fe4ec3 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 323 29 swift 0x0000000000fe48e9 swift::constraints::ConstraintSystem::solve(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 73 30 swift 0x0000000000fe481b swift::constraints::ConstraintSystem::solveSingle(swift::FreeTypeVariableBinding) + 59 31 swift 0x0000000000fc1c77 swift::checkMemberType(swift::DeclContext&, swift::Type, llvm::ArrayRef<swift::Identifier>) + 487 33 swift 0x000000000116b3c3 swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const + 35 38 swift 0x00000000010715f6 swift::Decl::print(swift::ASTPrinter&, swift::PrintOptions const&) const + 54 42 swift 0x0000000000f28a57 swift::TypeChecker::checkConformance(swift::NormalProtocolConformance*) + 2103 43 swift 0x0000000000f28f67 swift::TypeChecker::checkConformancesInContext(swift::DeclContext*, swift::IterableDeclContext*) + 487 50 swift 0x0000000000edfc26 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 53 swift 0x0000000000f4b744 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244 54 swift 0x0000000000f78aec swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876 55 swift 0x0000000000ec9506 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 1126 57 swift 0x0000000000f4b886 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134 58 swift 0x0000000000f0452d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133 59 swift 0x0000000000c86e69 swift::CompilerInstance::performSema() + 3289 61 swift 0x00000000007e0947 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 62 swift 0x00000000007a8e08 main + 2984 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28418-swift-typechecker-validatedecl.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28418-swift-typechecker-validatedecl-77c362.o 1. While type-checking expression at [validation-test/compiler_crashers/28418-swift-typechecker-validatedecl.swift:10:1 - line:14:13] RangeText="{protocol P{ 2. While type-checking 'P' at validation-test/compiler_crashers/28418-swift-typechecker-validatedecl.swift:10:2 3. While type-checking 'e' at validation-test/compiler_crashers/28418-swift-typechecker-validatedecl.swift:14:1 4. While resolving type e at [validation-test/compiler_crashers/28418-swift-typechecker-validatedecl.swift:14:13 - line:14:13] RangeText="e" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
cd07c2c125 |
Merge pull request #4795 from sigito/sr_2624
[SR-2624] Refine index out of bounds error messages for ArraySlice and SliceBuffer. |
||
|
|
d24353b523 | Use camel case for var names. | ||
|
|
53be51fb67 | Refine index out of bounds error messages for Arrays and SliceBuffer. | ||
|
|
f84a85fbc2 | [swiftc] Sync with swift-compiler-crashes (add regressions + missing cases) | ||
|
|
25e25ec80d |
[swiftc (63 vs. 5162)] Add crasher in swift::GenericSignature::getSubstitutions(...)
Add test case for crash triggered in `swift::GenericSignature::getSubstitutions(...)`. Current number of unresolved compiler crashers: 63 (5162 resolved) Assertion failure in [`lib/Sema/CSApply.cpp (line 133)`](https://github.com/apple/swift/blob/master/lib/Sema/CSApply.cpp#L133): ``` Assertion `(conforms || replacement->is<ErrorType>() || isOpenedAnyObject(replacement) || replacement->is<GenericTypeParamType>()) && "Constraint system missed a conformance?"' failed. When executing: auto swift::constraints::Solution::computeSubstitutions(swift::Type, swift::DeclContext *, swift::Type, swift::constraints::ConstraintLocator *, SmallVectorImpl<swift::Substitution> &)::(anonymous class)::operator()(swift::CanType, swift::Type, swift::ProtocolType *) const ``` Assertion context: ``` (void)isOpenedAnyObject; assert((conforms || replacement->is<ErrorType>() || isOpenedAnyObject(replacement) || replacement->is<GenericTypeParamType>()) && "Constraint system missed a conformance?"); (void)conforms; assert(conformance || replacement->is<ErrorType>() || replacement->hasDependentProtocolConformances()); ``` Stack trace: ``` swift: /path/to/swift/lib/Sema/CSApply.cpp:133: auto swift::constraints::Solution::computeSubstitutions(swift::Type, swift::DeclContext *, swift::Type, swift::constraints::ConstraintLocator *, SmallVectorImpl<swift::Substitution> &)::(anonymous class)::operator()(swift::CanType, swift::Type, swift::ProtocolType *) const: Assertion `(conforms || replacement->is<ErrorType>() || isOpenedAnyObject(replacement) || replacement->is<GenericTypeParamType>()) && "Constraint system missed a conformance?"' failed. 9 swift 0x000000000112c701 swift::GenericSignature::getSubstitutions(swift::ModuleDecl&, llvm::DenseMap<swift::TypeBase*, swift::Type, llvm::DenseMapInfo<swift::TypeBase*>, llvm::detail::DenseMapPair<swift::TypeBase*, swift::Type> > const&, llvm::function_ref<swift::ProtocolConformanceRef (swift::CanType, swift::Type, swift::ProtocolType*)>, llvm::SmallVectorImpl<swift::Substitution>&) const + 481 10 swift 0x0000000000f76713 swift::constraints::Solution::computeSubstitutions(swift::Type, swift::DeclContext*, swift::Type, swift::constraints::ConstraintLocator*, llvm::SmallVectorImpl<swift::Substitution>&) const + 563 15 swift 0x0000000000f28a74 swift::TypeChecker::checkConformance(swift::NormalProtocolConformance*) + 2132 16 swift 0x0000000000f28f67 swift::TypeChecker::checkConformancesInContext(swift::DeclContext*, swift::IterableDeclContext*) + 487 23 swift 0x0000000000edfc26 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 26 swift 0x0000000000f4b744 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244 27 swift 0x0000000000f78aec swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876 28 swift 0x0000000000ec9506 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 1126 30 swift 0x0000000000f4b886 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134 31 swift 0x0000000000f0452d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133 32 swift 0x0000000000c86e69 swift::CompilerInstance::performSema() + 3289 34 swift 0x00000000007e0947 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 35 swift 0x00000000007a8e08 main + 2984 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28417-swift-genericsignature-getsubstitutions.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28417-swift-genericsignature-getsubstitutions-1c018d.o 1. While type-checking expression at [validation-test/compiler_crashers/28417-swift-genericsignature-getsubstitutions.swift:10:13 - line:10:57] RangeText="{struct Q<T where T:A>{protocol A{enum S<f>{c" 2. While type-checking 'Q' at validation-test/compiler_crashers/28417-swift-genericsignature-getsubstitutions.swift:10:14 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
b131335946 |
[swiftc (62 vs. 5162)] Add crasher in swift::TypeChecker::resolveIdentifierType(...)
Add test case for crash triggered in `swift::TypeChecker::resolveIdentifierType(...)`. Current number of unresolved compiler crashers: 62 (5162 resolved) Assertion failure in [`include/swift/AST/DiagnosticEngine.h (line 614)`](https://github.com/apple/swift/blob/master/include/swift/AST/DiagnosticEngine.h#L614): ``` Assertion `!ActiveDiagnostic && "Already have an active diagnostic"' failed. When executing: swift::InFlightDiagnostic swift::DiagnosticEngine::diagnose(swift::SourceLoc, Diag<ArgTypes...>, typename detail::PassArgument<ArgTypes>::type...) [ArgTypes = <swift::Identifier>] ``` Assertion context: ``` /// the types expected by the diagnostic \p ID. template<typename ...ArgTypes> InFlightDiagnostic diagnose(SourceLoc Loc, Diag<ArgTypes...> ID, typename detail::PassArgument<ArgTypes>::type... Args) { assert(!ActiveDiagnostic && "Already have an active diagnostic"); ActiveDiagnostic = Diagnostic(ID, std::move(Args)...); ActiveDiagnostic->setLoc(Loc); return InFlightDiagnostic(*this); } ``` Stack trace: ``` swift: /path/to/swift/include/swift/AST/DiagnosticEngine.h:614: swift::InFlightDiagnostic swift::DiagnosticEngine::diagnose(swift::SourceLoc, Diag<ArgTypes...>, typename detail::PassArgument<ArgTypes>::type...) [ArgTypes = <swift::Identifier>]: Assertion `!ActiveDiagnostic && "Already have an active diagnostic"' failed. 12 swift 0x0000000000f51cb2 swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 162 14 swift 0x0000000000f52d54 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 15 swift 0x0000000000f514e3 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 195 18 swift 0x0000000000eda1e2 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3394 19 swift 0x000000000115029b swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2667 20 swift 0x0000000000f1eed1 swift::TypeChecker::lookupMemberType(swift::DeclContext*, swift::Type, swift::Identifier, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 289 21 swift 0x0000000000fdd1ad swift::constraints::ConstraintSystem::performMemberLookup(swift::constraints::ConstraintKind, swift::DeclName, swift::Type, swift::FunctionRefKind, swift::constraints::ConstraintLocator*, bool) + 2413 22 swift 0x0000000000fdef9b swift::constraints::ConstraintSystem::simplifyMemberConstraint(swift::constraints::Constraint const&) + 491 23 swift 0x0000000000fe0105 swift::constraints::ConstraintSystem::simplifyConstraint(swift::constraints::Constraint const&) + 69 24 swift 0x0000000000fea7db swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 12235 25 swift 0x0000000000fe4ec3 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 323 26 swift 0x0000000000fe48e9 swift::constraints::ConstraintSystem::solve(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 73 27 swift 0x0000000000fe481b swift::constraints::ConstraintSystem::solveSingle(swift::FreeTypeVariableBinding) + 59 28 swift 0x0000000000fc1c77 swift::checkMemberType(swift::DeclContext&, swift::Type, llvm::ArrayRef<swift::Identifier>) + 487 30 swift 0x000000000116b3c3 swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const + 35 35 swift 0x00000000010715f6 swift::Decl::print(swift::ASTPrinter&, swift::PrintOptions const&) const + 54 39 swift 0x0000000000f28a57 swift::TypeChecker::checkConformance(swift::NormalProtocolConformance*) + 2103 40 swift 0x0000000000f28f67 swift::TypeChecker::checkConformancesInContext(swift::DeclContext*, swift::IterableDeclContext*) + 487 43 swift 0x0000000000edfc26 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 46 swift 0x0000000000f4b744 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244 47 swift 0x0000000000f78aec swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876 48 swift 0x0000000000ec9506 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 1126 49 swift 0x0000000000ecd7e0 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 352 50 swift 0x0000000000ecd9d5 swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 229 59 swift 0x0000000000edfc26 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 60 swift 0x0000000000f044c2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026 61 swift 0x0000000000c86e69 swift::CompilerInstance::performSema() + 3289 63 swift 0x00000000007e0947 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 64 swift 0x00000000007a8e08 main + 2984 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28416-swift-typechecker-resolveidentifiertype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28416-swift-typechecker-resolveidentifiertype-0f7895.o 1. While type-checking 'A' at validation-test/compiler_crashers/28416-swift-typechecker-resolveidentifiertype.swift:10:1 2. While type-checking expression at [validation-test/compiler_crashers/28416-swift-typechecker-resolveidentifiertype.swift:14:7 - line:17:13] RangeText="{enum k:P{ 3. While type-checking 'k' at validation-test/compiler_crashers/28416-swift-typechecker-resolveidentifiertype.swift:14:8 4. While type-checking 'e' at validation-test/compiler_crashers/28416-swift-typechecker-resolveidentifiertype.swift:17:1 5. While resolving type a at [validation-test/compiler_crashers/28416-swift-typechecker-resolveidentifiertype.swift:17:13 - line:17:13] RangeText="a" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
6d32a0b1f8 | Merge pull request #4760 from practicalswift/swiftc-28415-swift-iterativetypechecker-processtypechecksuperclass | ||
|
|
b297ca824a |
[swiftc (61 vs. 5162)] Add crasher in swift::IterativeTypeChecker::processTypeCheckSuperclass(...)
Add test case for crash triggered in `swift::IterativeTypeChecker::processTypeCheckSuperclass(...)`. Current number of unresolved compiler crashers: 61 (5162 resolved) Assertion failure in [`lib/AST/Decl.cpp (line 4974)`](https://github.com/apple/swift/blob/master/lib/AST/Decl.cpp#L4974): ``` Assertion `(!superclass || !superclass->hasArchetype()) && "superclass must be interface type"' failed. When executing: void swift::ClassDecl::setSuperclass(swift::Type) ``` Assertion context: ``` return nullptr; } void ClassDecl::setSuperclass(Type superclass) { assert((!superclass || !superclass->hasArchetype()) && "superclass must be interface type"); LazySemanticInfo.Superclass.setPointerAndInt(superclass, true); } ``` Stack trace: ``` swift: /path/to/swift/lib/AST/Decl.cpp:4974: void swift::ClassDecl::setSuperclass(swift::Type): Assertion `(!superclass || !superclass->hasArchetype()) && "superclass must be interface type"' failed. 9 swift 0x000000000102294d swift::IterativeTypeChecker::processTypeCheckSuperclass(swift::ClassDecl*, llvm::function_ref<bool (swift::TypeCheckRequest)>) + 269 10 swift 0x0000000000ff95dd swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 493 11 swift 0x0000000000ed6940 swift::TypeChecker::resolveSuperclass(swift::ClassDecl*) + 64 12 swift 0x0000000001177da9 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver*) + 217 13 swift 0x0000000001178302 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver*) + 1586 14 swift 0x000000000117bfae swift::ConformanceLookupTable::getAllProtocols(swift::NominalTypeDecl*, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ProtocolDecl*>&) + 30 15 swift 0x000000000115b8bf swift::NominalTypeDecl::getAllProtocols() const + 95 16 swift 0x0000000000f2ab4d swift::TypeChecker::findWitnessedObjCRequirements(swift::ValueDecl const*, bool) + 141 20 swift 0x0000000000edfc26 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 21 swift 0x0000000000f65556 swift::createImplicitConstructor(swift::TypeChecker&, swift::NominalTypeDecl*, swift::ImplicitConstructorKind) + 1350 22 swift 0x0000000000ee6082 swift::TypeChecker::defineDefaultConstructor(swift::NominalTypeDecl*) + 338 23 swift 0x0000000000ee5074 swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl*) + 1732 24 swift 0x0000000000ed8267 swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 6007 25 swift 0x0000000000ed9617 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 375 26 swift 0x000000000115029b swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2667 27 swift 0x000000000114eabe swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 4990 28 swift 0x0000000000f1e153 swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 99 31 swift 0x0000000000f51cb2 swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 162 33 swift 0x0000000000f52d54 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 34 swift 0x0000000000f514e3 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 195 35 swift 0x0000000000ed7f8a swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 5274 36 swift 0x0000000000ed9617 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 375 37 swift 0x000000000115029b swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2667 38 swift 0x000000000114eabe swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 4990 39 swift 0x0000000000f1e153 swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 99 42 swift 0x0000000000f51cb2 swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 162 44 swift 0x0000000000f52d54 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 45 swift 0x0000000000f514e3 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 195 46 swift 0x000000000102279e swift::IterativeTypeChecker::processResolveInheritedClauseEntry(std::pair<llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>, unsigned int>, llvm::function_ref<bool (swift::TypeCheckRequest)>) + 158 47 swift 0x0000000000ff95dd swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 493 48 swift 0x0000000000ff9769 swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 889 49 swift 0x0000000000ed6a00 swift::TypeChecker::resolveInheritedProtocols(swift::ProtocolDecl*) + 64 50 swift 0x00000000010288f3 swift::ArchetypeBuilder::addConformanceRequirement(swift::ArchetypeBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::RequirementSource, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 179 53 swift 0x000000000102a99f swift::ArchetypeBuilder::visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<bool (swift::Type, swift::SourceLoc)>) + 175 54 swift 0x000000000102869a swift::ArchetypeBuilder::addAbstractTypeParamRequirements(swift::AbstractTypeParamDecl*, swift::ArchetypeBuilder::PotentialArchetype*, swift::RequirementSource::Kind, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 426 55 swift 0x00000000010284c5 swift::ArchetypeBuilder::addGenericParameterRequirements(swift::GenericTypeParamDecl*) + 165 56 swift 0x0000000000f19c48 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, swift::GenericEnvironment*, swift::GenericTypeResolver*) + 344 57 swift 0x0000000000f1b3b6 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 118 58 swift 0x0000000000f1be6e swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) + 126 59 swift 0x0000000000ed9bc6 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1830 64 swift 0x0000000000edfc26 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 65 swift 0x0000000000f044c2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026 66 swift 0x0000000000c86e69 swift::CompilerInstance::performSema() + 3289 68 swift 0x00000000007e0947 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 69 swift 0x00000000007a8e08 main + 2984 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28415-swift-iterativetypechecker-processtypechecksuperclass.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28415-swift-iterativetypechecker-processtypechecksuperclass-5fcc84.o 1. While type-checking 'B' at validation-test/compiler_crashers/28415-swift-iterativetypechecker-processtypechecksuperclass.swift:10:1 2. While resolving type a at [validation-test/compiler_crashers/28415-swift-iterativetypechecker-processtypechecksuperclass.swift:11:12 - line:11:12] RangeText="a" 3. While resolving type A at [validation-test/compiler_crashers/28415-swift-iterativetypechecker-processtypechecksuperclass.swift:12:9 - line:12:9] RangeText="A" 4. While defining default constructor for 'a' at validation-test/compiler_crashers/28415-swift-iterativetypechecker-processtypechecksuperclass.swift:12:1 5. While type-checking 'init' at validation-test/compiler_crashers/28415-swift-iterativetypechecker-processtypechecksuperclass.swift:12:7 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
fcd5fd3a23 |
[SourceKit] Add test case for crash triggered in swift::NameAliasType::getSinglyDesugaredType()
Stack trace: ``` found code completion token A at offset 126 swift-ide-test: /path/to/swift/include/swift/AST/Decl.h:2387: swift::Type swift::TypeAliasDecl::getUnderlyingType() const: Assertion `!UnderlyingTy.getType().isNull() && "getting invalid underlying type"' failed. 8 swift-ide-test 0x0000000000c890f2 swift::NameAliasType::getSinglyDesugaredType() + 146 9 swift-ide-test 0x0000000000c84baa swift::TypeBase::getCanonicalType() + 474 10 swift-ide-test 0x0000000000c84ca5 swift::TypeBase::getCanonicalType() + 725 11 swift-ide-test 0x0000000000c6e8a4 swift::removeShadowedDecls(llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::ModuleDecl const*, swift::LazyResolver*) + 324 16 swift-ide-test 0x0000000000c50e64 swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 1188 17 swift-ide-test 0x00000000009d3c62 swift::TypeChecker::performTypoCorrection(swift::DeclContext*, swift::DeclRefKind, swift::Type, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>, swift::LookupResult&, unsigned int) + 290 18 swift-ide-test 0x00000000009793ea swift::TypeChecker::resolveDeclRefExpr(swift::UnresolvedDeclRefExpr*, swift::DeclContext*) + 4058 20 swift-ide-test 0x0000000000bcca3b swift::Expr::walk(swift::ASTWalker&) + 27 21 swift-ide-test 0x0000000000979c70 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 224 22 swift-ide-test 0x000000000097d445 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 949 23 swift-ide-test 0x00000000009817d0 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 352 24 swift-ide-test 0x00000000009819c5 swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 229 26 swift-ide-test 0x000000000098dc61 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3857 28 swift-ide-test 0x000000000098da92 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3394 29 swift-ide-test 0x0000000000c72a0b swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2667 30 swift-ide-test 0x0000000000c7122e swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 4990 31 swift-ide-test 0x00000000009d2763 swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 99 34 swift-ide-test 0x0000000000a06042 swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 162 36 swift-ide-test 0x0000000000a070e4 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 37 swift-ide-test 0x0000000000a05873 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 195 40 swift-ide-test 0x000000000098da92 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3394 44 swift-ide-test 0x00000000009936e6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 45 swift-ide-test 0x00000000009b9172 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026 46 swift-ide-test 0x00000000007abc69 swift::CompilerInstance::performSema() + 3289 47 swift-ide-test 0x000000000074d981 main + 36401 Stack dump: 0. Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE> 1. While type-checking 'A' at <INPUT-FILE>:6:1 2. While type-checking 'e' at <INPUT-FILE>:9:1 3. While resolving type f at [<INPUT-FILE>:9:13 - line:9:13] RangeText="f" 4. While type-checking 'f' at <INPUT-FILE>:10:1 5. While type-checking expression at [<INPUT-FILE>:8:7 - line:8:7] RangeText="F" ``` |
||
|
|
ea06aad329 |
[swiftc (60 vs. 5162)] Add crasher in swift::TypeChecker::resolveWitness(...)
Add test case for crash triggered in `swift::TypeChecker::resolveWitness(...)`. Current number of unresolved compiler crashers: 60 (5162 resolved) Assertion failure in [`lib/Sema/TypeCheckProtocol.cpp (line 1826)`](https://github.com/apple/swift/blob/master/lib/Sema/TypeCheckProtocol.cpp#L1826): ``` Assertion `!resultReplacement->isTypeParameter() && "Can't be dependent"' failed. When executing: swift::Substitution getArchetypeSubstitution(swift::TypeChecker &, swift::DeclContext *, swift::ArchetypeType *, swift::Type) ``` Assertion context: ``` static Substitution getArchetypeSubstitution(TypeChecker &tc, DeclContext *dc, ArchetypeType *archetype, Type replacement) { Type resultReplacement = replacement; assert(!resultReplacement->isTypeParameter() && "Can't be dependent"); SmallVector<ProtocolConformanceRef, 4> conformances; bool isError = replacement->is<ErrorType>(); assert((archetype != nullptr || isError) && "Should have built archetypes already"); ``` Stack trace: ``` swift: /path/to/swift/lib/Sema/TypeCheckProtocol.cpp:1826: swift::Substitution getArchetypeSubstitution(swift::TypeChecker &, swift::DeclContext *, swift::ArchetypeType *, swift::Type): Assertion `!resultReplacement->isTypeParameter() && "Can't be dependent"' failed. 11 swift 0x0000000000f2b7f9 swift::TypeChecker::resolveWitness(swift::NormalProtocolConformance const*, swift::ValueDecl*) + 569 12 swift 0x000000000115a41b swift::NormalProtocolConformance::getWitness(swift::ValueDecl*, swift::LazyResolver*) const + 171 13 swift 0x0000000000f2ad06 swift::TypeChecker::findWitnessedObjCRequirements(swift::ValueDecl const*, bool) + 582 15 swift 0x0000000000eda049 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 2985 16 swift 0x0000000000f1621f swift::TypeChecker::getTypeOfRValue(swift::ValueDecl*, bool) + 15 18 swift 0x0000000000f5d5f3 swift::convertStoredVarInProtocolToComputed(swift::VarDecl*, swift::TypeChecker&) + 19 19 swift 0x0000000000f64b77 swift::maybeAddAccessorsToVariable(swift::VarDecl*, swift::TypeChecker&) + 2423 20 swift 0x0000000000ed9f4c swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 2732 29 swift 0x0000000000edfc26 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 30 swift 0x0000000000f044c2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026 31 swift 0x0000000000c86e69 swift::CompilerInstance::performSema() + 3289 33 swift 0x00000000007e0947 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 34 swift 0x00000000007a8e08 main + 2984 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28414-swift-typechecker-resolvewitness.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28414-swift-typechecker-resolvewitness-a8f5bd.o 1. While type-checking 'P' at validation-test/compiler_crashers/28414-swift-typechecker-resolvewitness.swift:10:7 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
81642a7d98 |
[swiftc (59 vs. 5162)] Add crasher in swift::TypeBase::getCanonicalType(...)
Add test case for crash triggered in `swift::TypeBase::getCanonicalType(...)`. Current number of unresolved compiler crashers: 59 (5162 resolved) Stack trace: ``` 15 swift 0x00000000010aaa04 swift::Decl::walk(swift::ASTWalker&) + 20 16 swift 0x000000000114349e swift::SourceFile::walk(swift::ASTWalker&) + 174 17 swift 0x0000000001090d24 swift::verify(swift::SourceFile&) + 52 18 swift 0x0000000000f04683 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1475 19 swift 0x0000000000c86e69 swift::CompilerInstance::performSema() + 3289 21 swift 0x00000000007e0947 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 22 swift 0x00000000007a8e08 main + 2984 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28413-swift-typebase-getcanonicaltype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28413-swift-typebase-getcanonicaltype-3df5c6.o 1. While walking into decl declaration 0x5d2b2d0 at validation-test/compiler_crashers/28413-swift-typebase-getcanonicaltype.swift:10:7 2. While walking into body of declaration 0x5d2b2d0 at validation-test/compiler_crashers/28413-swift-typebase-getcanonicaltype.swift:10:7 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
c549884ab4 |
[swiftc (58 vs. 5162)] Add crasher in swift::SourceFile::LookupCache::lookupClassMembers(...)
Add test case for crash triggered in `swift::SourceFile::LookupCache::lookupClassMembers(...)`.
Current number of unresolved compiler crashers: 58 (5162 resolved)
Assertion failure in `llvm/include/llvm/Support/Casting.h (line 237)`:
```
Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
When executing: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = swift::AnyFunctionType, Y = swift::TypeBase]
```
Assertion context:
```
typename simplify_type<Y>::SimpleType>::doit(Val);
}
template <class X, class Y>
inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
assert(isa<X>(Val) && "cast<Ty>() argument of incompatible type!");
return cast_convert_val<X, Y*,
typename simplify_type<Y*>::SimpleType>::doit(Val);
}
// cast_or_null<X> - Functionally identical to cast, except that a null value is
```
Stack trace:
```
swift: /path/to/llvm/include/llvm/Support/Casting.h:237: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = swift::AnyFunctionType, Y = swift::TypeBase]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
9 swift 0x000000000113bd83 swift::SourceFile::LookupCache::lookupClassMembers(llvm::ArrayRef<std::pair<swift::Identifier, swift::SourceLoc> >, swift::VisibleDeclConsumer&, swift::SourceFile const&) + 787
10 swift 0x000000000113d252 swift::ModuleDecl::lookupClassMembers(llvm::ArrayRef<std::pair<swift::Identifier, swift::SourceLoc> >, swift::VisibleDeclConsumer&) const + 50
12 swift 0x000000000114215d swift::ModuleDecl::forAllVisibleModules(llvm::ArrayRef<std::pair<swift::Identifier, swift::SourceLoc> >, bool, llvm::function_ref<bool (std::pair<llvm::ArrayRef<std::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*>)>) + 477
13 swift 0x00000000011422d1 swift::FileUnit::forAllVisibleModules(llvm::function_ref<bool (std::pair<llvm::ArrayRef<std::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*>)>) + 81
18 swift 0x000000000112e9e4 swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 1188
19 swift 0x0000000000f1f652 swift::TypeChecker::performTypoCorrection(swift::DeclContext*, swift::DeclRefKind, swift::Type, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>, swift::LookupResult&, unsigned int) + 290
20 swift 0x0000000000ec53fa swift::TypeChecker::resolveDeclRefExpr(swift::UnresolvedDeclRefExpr*, swift::DeclContext*) + 4058
22 swift 0x00000000010aa5bb swift::Expr::walk(swift::ASTWalker&) + 27
23 swift 0x0000000000ec5c80 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 224
24 swift 0x0000000000ec9455 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 949
25 swift 0x0000000000ecd7e0 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 352
26 swift 0x0000000000ecd9d5 swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 229
35 swift 0x0000000000edfc26 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
36 swift 0x0000000000f044c2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026
37 swift 0x0000000000c86e69 swift::CompilerInstance::performSema() + 3289
39 swift 0x00000000007e0947 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887
40 swift 0x00000000007a8e08 main + 2984
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28412-swift-sourcefile-lookupcache-lookupclassmembers.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28412-swift-sourcefile-lookupcache-lookupclassmembers-91d26f.o
1. While type-checking 'c' at validation-test/compiler_crashers/28412-swift-sourcefile-lookupcache-lookupclassmembers.swift:10:1
2. While type-checking expression at [validation-test/compiler_crashers/28412-swift-sourcefile-lookupcache-lookupclassmembers.swift:10:67 - line:10:67] RangeText="o"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
|
||
|
|
63a04fa2cd |
[swiftc (57 vs. 5162)] Add crasher in swift::TypeChecker::resolveIdentifierType(...)
Add test case for crash triggered in `swift::TypeChecker::resolveIdentifierType(...)`.
Current number of unresolved compiler crashers: 57 (5162 resolved)
Stack trace:
```
6 swift 0x00000000033a62bd llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 461
9 swift 0x0000000000f51cb2 swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 162
11 swift 0x0000000000f52d54 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
12 swift 0x0000000000f514e3 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 195
14 swift 0x0000000000f21302 swift::TypeChecker::typeCheckParameterList(swift::ParameterList*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*) + 114
17 swift 0x0000000000edfc26 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
20 swift 0x0000000000f4b744 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244
21 swift 0x0000000000f78aec swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876
22 swift 0x0000000000ec9506 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 1126
25 swift 0x0000000000f4a52a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346
26 swift 0x0000000000f4a38e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
27 swift 0x0000000000f4af63 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179
29 swift 0x0000000000f045c1 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281
30 swift 0x0000000000c86e69 swift::CompilerInstance::performSema() + 3289
32 swift 0x00000000007e0947 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887
33 swift 0x00000000007a8e08 main + 2984
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28411-swift-typechecker-resolveidentifiertype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28411-swift-typechecker-resolveidentifiertype-b907a1.o
1. While type-checking 'b' at validation-test/compiler_crashers/28411-swift-typechecker-resolveidentifiertype.swift:9:1
2. While type-checking expression at [validation-test/compiler_crashers/28411-swift-typechecker-resolveidentifiertype.swift:9:25 - line:9:37] RangeText="{func x(n:f.d"
3. While type-checking 'x' at validation-test/compiler_crashers/28411-swift-typechecker-resolveidentifiertype.swift:9:26
4. While resolving type f.d at [validation-test/compiler_crashers/28411-swift-typechecker-resolveidentifiertype.swift:9:35 - line:9:37] RangeText="f.d"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
|
||
|
|
3aa10e38c7 |
[swiftc (56 vs. 5162)] Add crasher in swift::TypeChecker::typeCheckDecl(...)
Add test case for crash triggered in `swift::TypeChecker::typeCheckDecl(...)`. Current number of unresolved compiler crashers: 56 (5162 resolved) Assertion failure in [`lib/Sema/TypeCheckDecl.cpp (line 4773)`](https://github.com/apple/swift/blob/master/lib/Sema/TypeCheckDecl.cpp#L4773): ``` Assertion `!FD->getType()->hasTypeParameter()' failed. When executing: void (anonymous namespace)::DeclChecker::visitFuncDecl(swift::FuncDecl *) ``` Assertion context: ``` if (FD->isInvalid()) return; // This type check should have created a non-dependent type. assert(!FD->getType()->hasTypeParameter()); validateAttributes(TC, FD); // Member functions need some special validation logic. if (FD->getDeclContext()->isTypeContext()) { ``` Stack trace: ``` swift: /path/to/swift/lib/Sema/TypeCheckDecl.cpp:4773: void (anonymous namespace)::DeclChecker::visitFuncDecl(swift::FuncDecl *): Assertion `!FD->getType()->hasTypeParameter()' failed. 10 swift 0x0000000000edfc26 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 11 swift 0x0000000000f5dc35 swift::addTrivialAccessorsToStorage(swift::AbstractStorageDecl*, swift::TypeChecker&) + 485 12 swift 0x0000000000f64b2d swift::maybeAddAccessorsToVariable(swift::VarDecl*, swift::TypeChecker&) + 2349 13 swift 0x0000000000ed9f4c swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 2732 14 swift 0x0000000000f6519e swift::createImplicitConstructor(swift::TypeChecker&, swift::NominalTypeDecl*, swift::ImplicitConstructorKind) + 398 15 swift 0x0000000000ee5017 swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl*) + 1639 18 swift 0x0000000000edfc26 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 21 swift 0x0000000000f4a52a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346 22 swift 0x0000000000f4a38e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46 23 swift 0x0000000000f4af63 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179 25 swift 0x0000000000f045c1 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281 26 swift 0x0000000000c86e69 swift::CompilerInstance::performSema() + 3289 28 swift 0x00000000007e0947 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 29 swift 0x00000000007a8e08 main + 2984 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28410-swift-typechecker-typecheckdecl.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28410-swift-typechecker-typecheckdecl-96fda3.o 1. While type-checking 'g' at validation-test/compiler_crashers/28410-swift-typechecker-typecheckdecl.swift:10:1 2. While type-checking 'A' at validation-test/compiler_crashers/28410-swift-typechecker-typecheckdecl.swift:11:1 3. While type-checking getter for f at validation-test/compiler_crashers/28410-swift-typechecker-typecheckdecl.swift:11:14 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
4abdc51cf1 | Merge pull request #4720 from practicalswift/swiftc-28409-swift-archetypebuilder-maptypeintocontext | ||
|
|
0b94f8143a |
[swiftc (55 vs. 5162)] Add crasher in swift::GenericEnvironment::mapTypeIntoContext(...)
Add test case for crash triggered in `swift::GenericEnvironment::mapTypeIntoContext(...)`.
Current number of unresolved compiler crashers: 55 (5162 resolved)
Stack trace:
```
4 swift 0x000000000112b26b swift::GenericEnvironment::mapTypeIntoContext(swift::ModuleDecl*, swift::Type) const + 27
10 swift 0x0000000000edfc26 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
13 swift 0x0000000000f4b744 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244
14 swift 0x0000000000f78aec swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876
15 swift 0x0000000000ec9506 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 1126
17 swift 0x0000000000f4b886 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
18 swift 0x0000000000f0452d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133
19 swift 0x0000000000c86e69 swift::CompilerInstance::performSema() + 3289
21 swift 0x00000000007e0947 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887
22 swift 0x00000000007a8e08 main + 2984
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28409-swift-archetypebuilder-maptypeintocontext.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28409-swift-archetypebuilder-maptypeintocontext-ca7bb4.o
1. While type-checking expression at [validation-test/compiler_crashers/28409-swift-archetypebuilder-maptypeintocontext.swift:9:1 - line:11:6] RangeText="{
2. While type-checking 'A' at validation-test/compiler_crashers/28409-swift-archetypebuilder-maptypeintocontext.swift:10:1
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
|
||
|
|
af345fae31 |
[SourceKit] Add test case for crash triggered in swift::TypeChecker::performTypoCorrection(swift::DeclContext*, swift::DeclRefKind, swift::Type, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>, swift::LookupResult&, unsigned int)
Stack trace: ``` found code completion token A at offset 158 swift-ide-test: /path/to/swift/lib/AST/LookupVisibleDecls.cpp:566: void lookupVisibleMemberDeclsImpl(swift::Type, swift::VisibleDeclConsumer &, const swift::DeclContext *, (anonymous namespace)::LookupState, swift::DeclVisibilityKind, swift::LazyResolver *, VisitedSet &): Assertion `BaseTy.getPointer() != CurClass->getSuperclass().getPointer() && "type is its own superclass"' failed. 10 swift-ide-test 0x00000000009d3c4b swift::TypeChecker::performTypoCorrection(swift::DeclContext*, swift::DeclRefKind, swift::Type, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>, swift::LookupResult&, unsigned int) + 267 12 swift-ide-test 0x0000000000a54d43 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 2899 13 swift-ide-test 0x0000000000a5aade swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4078 14 swift-ide-test 0x0000000000979d67 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 471 15 swift-ide-test 0x000000000097d445 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 949 16 swift-ide-test 0x00000000009817d0 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 352 17 swift-ide-test 0x00000000009819c5 swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 229 22 swift-ide-test 0x00000000009936e6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 25 swift-ide-test 0x00000000009fe89a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346 26 swift-ide-test 0x00000000009fe6fe swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46 27 swift-ide-test 0x00000000009bb5df swift::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 655 33 swift-ide-test 0x0000000000bcce84 swift::Decl::walk(swift::ASTWalker&) + 20 34 swift-ide-test 0x0000000000c65a5e swift::SourceFile::walk(swift::ASTWalker&) + 174 35 swift-ide-test 0x0000000000c64b7f swift::ModuleDecl::walk(swift::ASTWalker&) + 79 36 swift-ide-test 0x0000000000c3b90b swift::DeclContext::walkContext(swift::ASTWalker&) + 187 37 swift-ide-test 0x00000000008f29c8 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 136 38 swift-ide-test 0x00000000007abd9d swift::CompilerInstance::performSema() + 3597 39 swift-ide-test 0x000000000074d981 main + 36401 Stack dump: 0. Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE> 1. While walking into decl getter for a at <INPUT-FILE>:3:6 2. While type-checking 'S' at <INPUT-FILE>:3:7 3. While type-checking expression at [<INPUT-FILE>:3:20 - line:3:22] RangeText="A.a" ``` |
||
|
|
13514c20ae | Merge pull request #4718 from practicalswift/swiftc-28408-swift-typechecker-checkinheritanceclause | ||
|
|
ccc7c422b6 |
[swiftc (54 vs. 5162)] Add crasher in swift::TypeChecker::checkInheritanceClause(...)
Add test case for crash triggered in `swift::TypeChecker::checkInheritanceClause(...)`. Current number of unresolved compiler crashers: 54 (5162 resolved) Assertion failure in [`lib/AST/GenericEnvironment.cpp (line 58)`](https://github.com/apple/swift/blob/master/lib/AST/GenericEnvironment.cpp#L58): ``` Assertion `!type->hasArchetype() && "not fully substituted"' failed. When executing: swift::Type swift::GenericEnvironment::mapTypeOutOfContext(swift::ModuleDecl *, swift::Type) const ``` Assertion context: ``` return ctx.Allocate(bytes, alignof(GenericEnvironment), AllocationArena::Permanent); } Type GenericEnvironment::mapTypeOutOfContext(ModuleDecl *M, Type type) const { type = type.subst(M, ArchetypeToInterfaceMap, SubstFlags::AllowLoweredTypes); assert(!type->hasArchetype() && "not fully substituted"); return type; } Type GenericEnvironment::mapTypeIntoContext(ModuleDecl *M, Type type) const { type = type.subst(M, InterfaceToArchetypeMap, SubstFlags::AllowLoweredTypes); ``` Stack trace: ``` swift: /path/to/swift/lib/AST/GenericEnvironment.cpp:58: swift::Type swift::GenericEnvironment::mapTypeOutOfContext(swift::ModuleDecl *, swift::Type) const: Assertion `!type->hasArchetype() && "not fully substituted"' failed. 9 swift 0x0000000000ed8032 swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 5442 10 swift 0x0000000000ed9617 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 375 11 swift 0x0000000000ed9570 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 208 14 swift 0x000000000114874d swift::namelookup::lookupVisibleDeclsInModule(swift::ModuleDecl*, llvm::ArrayRef<std::pair<swift::Identifier, swift::SourceLoc> >, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::pair<llvm::ArrayRef<std::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >) + 1101 15 swift 0x000000000112ec12 swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 1746 16 swift 0x0000000000f1f652 swift::TypeChecker::performTypoCorrection(swift::DeclContext*, swift::DeclRefKind, swift::Type, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>, swift::LookupResult&, unsigned int) + 290 17 swift 0x0000000000ec53fa swift::TypeChecker::resolveDeclRefExpr(swift::UnresolvedDeclRefExpr*, swift::DeclContext*) + 4058 19 swift 0x00000000010aa5bb swift::Expr::walk(swift::ASTWalker&) + 27 20 swift 0x0000000000ec5c80 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 224 21 swift 0x0000000000ec9455 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 949 24 swift 0x0000000000f4b744 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244 25 swift 0x0000000000f78aec swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876 26 swift 0x0000000000ec9506 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 1126 27 swift 0x0000000000ecd7e0 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 352 28 swift 0x0000000000ecd9d5 swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 229 33 swift 0x0000000000edfc26 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 34 swift 0x0000000000f044c2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026 35 swift 0x0000000000c86e69 swift::CompilerInstance::performSema() + 3289 37 swift 0x00000000007e0947 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 38 swift 0x00000000007a8e08 main + 2984 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28408-swift-typechecker-checkinheritanceclause.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28408-swift-typechecker-checkinheritanceclause-0af88b.o 1. While type-checking 'A' at validation-test/compiler_crashers/28408-swift-typechecker-checkinheritanceclause.swift:10:1 2. While type-checking expression at [validation-test/compiler_crashers/28408-swift-typechecker-checkinheritanceclause.swift:14:1 - line:14:8] RangeText="{func<a}" 3. While type-checking expression at [validation-test/compiler_crashers/28408-swift-typechecker-checkinheritanceclause.swift:14:7 - line:14:7] RangeText="a" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
597ee2b770 |
[SourceKit] Add test case for crash triggered in swift::DeclContext::getParentModule() const
Stack trace: ``` found code completion token A at offset 166 4 swift-ide-test 0x0000000000c3a451 swift::DeclContext::getParentModule() const + 1 5 swift-ide-test 0x0000000000b57613 swift::ArchetypeBuilder::mapTypeOutOfContext(swift::DeclContext const*, swift::Type) + 19 6 swift-ide-test 0x0000000000c5818c swift::Mangle::Mangler::mangleType(swift::Type, unsigned int) + 4188 7 swift-ide-test 0x0000000000c5a6fd swift::Mangle::Mangler::mangleBoundGenericType(swift::Type) + 269 8 swift-ide-test 0x0000000000c59432 swift::Mangle::Mangler::mangleDeclType(swift::ValueDecl const*, unsigned int) + 242 9 swift-ide-test 0x0000000000c565fd swift::Mangle::Mangler::mangleNominalType(swift::NominalTypeDecl const*) + 157 10 swift-ide-test 0x0000000000c990d9 swift::ide::printDeclUSR(swift::ValueDecl const*, llvm::raw_ostream&) + 1113 12 swift-ide-test 0x00000000007b45d8 copyAssociatedUSRs(llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>&, swift::Decl const*) + 104 13 swift-ide-test 0x00000000007b543e swift::ide::CodeCompletionResultBuilder::takeResult() + 1646 17 swift-ide-test 0x0000000000c50bf2 swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 562 24 swift-ide-test 0x0000000000bcce84 swift::Decl::walk(swift::ASTWalker&) + 20 25 swift-ide-test 0x0000000000c65a5e swift::SourceFile::walk(swift::ASTWalker&) + 174 26 swift-ide-test 0x0000000000c64b7f swift::ModuleDecl::walk(swift::ASTWalker&) + 79 27 swift-ide-test 0x0000000000c3b90b swift::DeclContext::walkContext(swift::ASTWalker&) + 187 28 swift-ide-test 0x00000000008f29c8 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 136 29 swift-ide-test 0x00000000007abd9d swift::CompilerInstance::performSema() + 3597 30 swift-ide-test 0x000000000074d981 main + 36401 Stack dump: 0. Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE> 1. While walking into decl 'c' at <INPUT-FILE>:3:1 ``` |
||
|
|
ef75e47632 | Merge pull request #4716 from practicalswift/sourcekit-086-swift-printoptions-setarchetypeanddynamicselftransform | ||
|
|
5823b8f067 | Merge pull request #4715 from practicalswift/swiftc-28407-swift-genericsignature-getsubstitutionmap | ||
|
|
85fe0ade35 |
[SourceKit] Add test case for crash triggered in swift::PrintOptions::setArchetypeAndDynamicSelfTransform(swift::Type, swift::DeclContext*)
Stack trace:
```
found code completion token A at offset 144
swift-ide-test: /path/to/swift/lib/AST/ASTPrinter.cpp:69: std::unique_ptr<llvm::DenseMap<StringRef, Type> > swift::collectNameTypeMap(swift::Type): Assertion `ParamDecls.size() == Args.size()' failed.
9 swift-ide-test 0x0000000000b982b2 swift::PrintOptions::setArchetypeAndDynamicSelfTransform(swift::Type, swift::DeclContext*) + 130
13 swift-ide-test 0x00000000009dd067 swift::TypeChecker::checkConformance(swift::NormalProtocolConformance*) + 2103
14 swift-ide-test 0x00000000009dd577 swift::TypeChecker::checkConformancesInContext(swift::DeclContext*, swift::IterableDeclContext*) + 487
19 swift-ide-test 0x00000000009936e6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
22 swift-ide-test 0x00000000009ffab4 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244
23 swift-ide-test 0x0000000000a37d7c swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876
24 swift-ide-test 0x000000000097d4f6 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 1126
26 swift-ide-test 0x00000000009ffbf6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
27 swift-ide-test 0x00000000009b91dd swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133
28 swift-ide-test 0x00000000007abc69 swift::CompilerInstance::performSema() + 3289
29 swift-ide-test 0x000000000074d981 main + 36401
Stack dump:
0. Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1. While type-checking expression at [<INPUT-FILE>:3:1 - line:3:30] RangeText="{protocol b{func aenum S<T>:b"
2. While type-checking 'b' at <INPUT-FILE>:3:2
```
|
||
|
|
699cc9e626 |
[swiftc (53 vs. 5162)] Add crasher in swift::GenericSignature::getSubstitutionMap(...)
Add test case for crash triggered in `swift::GenericSignature::getSubstitutionMap(...)`. Current number of unresolved compiler crashers: 53 (5162 resolved) Stack trace: ``` 4 swift 0x000000000112c2eb swift::GenericSignature::getSubstitutionMap(llvm::ArrayRef<swift::Substitution>, swift::SubstitutionMap&) const + 27 5 swift 0x000000000112c2bf swift::GenericSignature::getSubstitutionMap(llvm::ArrayRef<swift::Substitution>) const + 47 6 swift 0x0000000001167a6c swift::TypeBase::getSuperclass(swift::LazyResolver*) + 220 7 swift 0x000000000117b431 swift::ConformanceLookupTable::getConformance(swift::NominalTypeDecl*, swift::LazyResolver*, swift::ConformanceLookupTable::ConformanceEntry*) + 289 9 swift 0x000000000117bb54 swift::ConformanceLookupTable::lookupConformances(swift::NominalTypeDecl*, swift::DeclContext*, swift::LazyResolver*, swift::ConformanceLookupKind, llvm::SmallVectorImpl<swift::ProtocolDecl*>*, llvm::SmallVectorImpl<swift::ProtocolConformance*>*, llvm::SmallVectorImpl<swift::ConformanceDiagnostic>*) + 692 10 swift 0x000000000115bcb4 swift::DeclContext::getLocalConformances(swift::ConformanceLookupKind, llvm::SmallVectorImpl<swift::ConformanceDiagnostic>*, bool) const + 212 11 swift 0x0000000000f28ed2 swift::TypeChecker::checkConformancesInContext(swift::DeclContext*, swift::IterableDeclContext*) + 338 14 swift 0x0000000000edfc26 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 17 swift 0x0000000000f4a52a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346 18 swift 0x0000000000f4a38e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46 19 swift 0x0000000000f4af63 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179 21 swift 0x0000000000f045c1 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281 22 swift 0x0000000000c86e69 swift::CompilerInstance::performSema() + 3289 24 swift 0x00000000007e0947 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 25 swift 0x00000000007a8e08 main + 2984 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28407-swift-genericsignature-getsubstitutionmap.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28407-swift-genericsignature-getsubstitutionmap-4752b5.o 1. While type-checking 'b' at validation-test/compiler_crashers/28407-swift-genericsignature-getsubstitutionmap.swift:9:19 2. While type-checking 'A' at validation-test/compiler_crashers/28407-swift-genericsignature-getsubstitutionmap.swift:9:28 <unknown>:0: error: unable to execute command: Segmentation fault <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
f9429003a8 |
[SourceKit] Add test case for crash triggered in swift::PersistentParserState::delayTopLevel(swift::TopLevelCodeDecl*, swift::SourceRange, swift::SourceLoc)
Stack trace: ``` found code completion token A at offset 151 swift-ide-test: /path/to/swift/lib/Parse/PersistentParserState.cpp:76: void swift::PersistentParserState::delayDecl(swift::PersistentParserState::DelayedDeclKind, unsigned int, swift::DeclContext *, swift::SourceRange, swift::SourceLoc): Assertion `!CodeCompletionDelayedDeclState.get() && "only one decl can be delayed for code completion"' failed. 9 swift-ide-test 0x0000000000937ec5 swift::PersistentParserState::delayTopLevel(swift::TopLevelCodeDecl*, swift::SourceRange, swift::SourceLoc) + 37 10 swift-ide-test 0x000000000092626f swift::Parser::consumeTopLevelDecl(swift::Parser::ParserPosition, swift::TopLevelCodeDecl*) + 143 11 swift-ide-test 0x0000000000926e21 swift::Parser::parseBraceItems(llvm::SmallVectorImpl<swift::ASTNode>&, swift::BraceItemListKind, swift::BraceItemListKind) + 2929 12 swift-ide-test 0x00000000008bd01c swift::Parser::parseTopLevel() + 156 13 swift-ide-test 0x00000000008f28d0 swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 208 14 swift-ide-test 0x00000000007abc46 swift::CompilerInstance::performSema() + 3254 15 swift-ide-test 0x000000000074d981 main + 36401 Stack dump: 0. Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE> 1. With parser at source location: <INPUT-FILE>:4:3 ``` |
||
|
|
bce9fe7477 |
Merge pull request #4712 from practicalswift/swiftc-28406-swift-decomposeparamtype
[swiftc (52 vs. 5162)] Add crasher in swift::decomposeParamType(...) |
||
|
|
25178a1a61 |
Merge pull request #4711 from practicalswift/sourcekit-084-swift-parser-consumedecl
[SourceKit] Add test case for crash triggered in swift::Parser::consumeDecl(…) |
||
|
|
dc411d1286 |
Merge pull request #4710 from practicalswift/sil-034-swift-expr-propagatelvalueaccesskind
[SIL] Add test case for crash triggered in swift::Expr::propagateLValueAccessKind(…) |
||
|
|
231fb5e054 |
Disable validation-test/stdlib/UnicodeLongTest.swift for watchos.
rdar://28250966 |
||
|
|
31195798a7 | Merge remote-tracking branch 'origin/master-next' | ||
|
|
49b435e3ac |
[swiftc (52 vs. 5162)] Add crasher in swift::decomposeParamType(...)
Add test case for crash triggered in `swift::decomposeParamType(...)`.
Current number of unresolved compiler crashers: 52 (5162 resolved)
Assertion failure in `llvm/include/llvm/ADT/ArrayRef.h (line 186)`:
```
Assertion `Index < Length && "Invalid index!"' failed.
When executing: const T &llvm::ArrayRef<swift::ParamDecl *>::operator[](size_t) const [T = swift::ParamDecl *]
```
Assertion context:
```
/// @}
/// @name Operator Overloads
/// @{
const T &operator[](size_t Index) const {
assert(Index < Length && "Invalid index!");
return Data[Index];
}
/// @}
/// @name Expensive Operations
```
Stack trace:
```
swift: /path/to/llvm/include/llvm/ADT/ArrayRef.h:186: const T &llvm::ArrayRef<swift::ParamDecl *>::operator[](size_t) const [T = swift::ParamDecl *]: Assertion `Index < Length && "Invalid index!"' failed.
8 swift 0x0000000001165954 swift::decomposeParamType(swift::Type, swift::ValueDecl const*, unsigned int) + 708
12 swift 0x0000000000f95819 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 105
13 swift 0x0000000000f9c09e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4078
14 swift 0x0000000000ec5d77 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 471
15 swift 0x0000000000ec9455 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 949
18 swift 0x0000000000f95819 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 105
19 swift 0x0000000000f9c09e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4078
20 swift 0x0000000000ec5d77 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 471
21 swift 0x0000000000ec9455 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 949
26 swift 0x00000000010aa5eb swift::Expr::walk(swift::ASTWalker&) + 75
27 swift 0x000000000112425b swift::Expr::forEachImmediateChildExpr(std::function<swift::Expr* (swift::Expr*)> const&) + 43
29 swift 0x0000000000f95819 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 105
30 swift 0x0000000000f9c09e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4078
31 swift 0x0000000000ec5d77 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 471
32 swift 0x0000000000ec9455 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 949
33 swift 0x0000000000ecd7e0 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 352
34 swift 0x0000000000ecd9d5 swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 229
37 swift 0x0000000000edfc26 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
39 swift 0x0000000000f4b886 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
40 swift 0x0000000000f0452d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133
41 swift 0x0000000000c86e69 swift::CompilerInstance::performSema() + 3289
43 swift 0x00000000007e0947 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887
44 swift 0x00000000007a8e08 main + 2984
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28406-swift-decomposeparamtype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28406-swift-decomposeparamtype-072c9e.o
1. While type-checking declaration 0x65c9410 at validation-test/compiler_crashers/28406-swift-decomposeparamtype.swift:12:1
2. While type-checking expression at [validation-test/compiler_crashers/28406-swift-decomposeparamtype.swift:12:7 - line:12:10] RangeText="b()?"
3. While type-checking expression at [validation-test/compiler_crashers/28406-swift-decomposeparamtype.swift:12:7 - line:12:10] RangeText="b()?"
4. While type-checking expression at [validation-test/compiler_crashers/28406-swift-decomposeparamtype.swift:12:7 - line:12:9] RangeText="b()"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
|
||
|
|
a807e6de56 |
[SIL] Add test case for crash triggered in llvm::llvm_unreachable_internal(char const*, char const*, unsigned int)
Stack trace: ``` <stdin>:3:1: error: expressions are not allowed at the top level .x.a=Int ^ not an l-value UNREACHABLE executed at /path/to/swift/include/swift/AST/ExprNodes.def:79! 6 sil-opt 0x000000000309743d llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 461 8 sil-opt 0x0000000000e39837 swift::Expr::propagateLValueAccessKind(swift::AccessKind, bool) + 23 12 sil-opt 0x0000000000dc250c swift::Expr::walk(swift::ASTWalker&) + 108 13 sil-opt 0x0000000000b93df2 swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 514 14 sil-opt 0x0000000000ae2e86 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 1126 17 sil-opt 0x0000000000bb2a17 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 7671 18 sil-opt 0x0000000000bb750e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4078 19 sil-opt 0x0000000000adf6f7 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 471 20 sil-opt 0x0000000000ae2dd5 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 949 22 sil-opt 0x0000000000b66cd6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134 23 sil-opt 0x0000000000b1f3cd swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133 24 sil-opt 0x00000000007758a9 swift::CompilerInstance::performSema() + 3289 25 sil-opt 0x000000000075ec65 main + 1813 Stack dump: 0. Program arguments: sil-opt -enable-sil-verify-all 1. While type-checking expression at [<stdin>:3:1 - line:3:6] RangeText=".x.a=I" 2. While type-checking expression at [<stdin>:3:1 - line:3:6] RangeText=".x.a=I" ``` |
||
|
|
3c1a63a69f |
[SourceKit] Add test case for crash triggered in swift::Parser::consumeDecl(swift::Parser::ParserPosition, swift::OptionSet<swift::Parser::ParseDeclFlags, unsigned int>, bool)
Stack trace: ``` found code completion token A at offset 140 swift-ide-test: /path/to/swift/lib/Parse/PersistentParserState.cpp:76: void swift::PersistentParserState::delayDecl(swift::PersistentParserState::DelayedDeclKind, unsigned int, swift::DeclContext *, swift::SourceRange, swift::SourceLoc): Assertion `!CodeCompletionDelayedDeclState.get() && "only one decl can be delayed for code completion"' failed. 9 swift-ide-test 0x00000000008c778f swift::Parser::consumeDecl(swift::Parser::ParserPosition, swift::OptionSet<swift::Parser::ParseDeclFlags, unsigned int>, bool) + 175 10 swift-ide-test 0x00000000008c8ef2 swift::Parser::parseDecl(swift::OptionSet<swift::Parser::ParseDeclFlags, unsigned int>, llvm::function_ref<void (swift::Decl*)>) + 4674 11 swift-ide-test 0x00000000009265f9 swift::Parser::parseBraceItems(llvm::SmallVectorImpl<swift::ASTNode>&, swift::BraceItemListKind, swift::BraceItemListKind) + 841 12 swift-ide-test 0x00000000008e7378 swift::Parser::parseExprClosure() + 936 13 swift-ide-test 0x00000000008e7e62 swift::Parser::parseTrailingClosure(swift::SourceRange) + 34 14 swift-ide-test 0x00000000008e0b8b swift::Parser::parseExprPostfix(swift::Diag<>, bool) + 5499 15 swift-ide-test 0x00000000008dde2e swift::Parser::parseExprSequence(swift::Diag<>, bool, bool) + 174 16 swift-ide-test 0x00000000008ddd02 swift::Parser::parseExprImpl(swift::Diag<>, bool) + 146 18 swift-ide-test 0x00000000008f5d99 swift::Parser::parseList(swift::tok, swift::SourceLoc, swift::SourceLoc&, swift::tok, bool, bool, swift::Diag<>, std::function<swift::ParserStatus ()>) + 393 19 swift-ide-test 0x00000000008e4ddb swift::Parser::parseExprList(swift::tok, swift::tok, bool, bool, swift::SourceLoc&, llvm::SmallVectorImpl<swift::Expr*>&, llvm::SmallVectorImpl<swift::Identifier>&, llvm::SmallVectorImpl<swift::SourceLoc>&, swift::SourceLoc&, swift::Expr*&) + 267 20 swift-ide-test 0x00000000008e7fe2 swift::Parser::parseExprList(swift::tok, swift::tok) + 226 21 swift-ide-test 0x00000000008e00f2 swift::Parser::parseExprPostfix(swift::Diag<>, bool) + 2786 22 swift-ide-test 0x00000000008dde2e swift::Parser::parseExprSequence(swift::Diag<>, bool, bool) + 174 23 swift-ide-test 0x00000000008ddd02 swift::Parser::parseExprImpl(swift::Diag<>, bool) + 146 24 swift-ide-test 0x0000000000924cf6 swift::Parser::parseExprOrStmt(swift::ASTNode&) + 422 25 swift-ide-test 0x00000000009269fb swift::Parser::parseBraceItems(llvm::SmallVectorImpl<swift::ASTNode>&, swift::BraceItemListKind, swift::BraceItemListKind) + 1867 26 swift-ide-test 0x00000000008bd01c swift::Parser::parseTopLevel() + 156 27 swift-ide-test 0x00000000008f28d0 swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 208 28 swift-ide-test 0x00000000007abc46 swift::CompilerInstance::performSema() + 3254 29 swift-ide-test 0x000000000074d981 main + 36401 Stack dump: 0. Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE> 1. With parser at source location: <INPUT-FILE>:3:16 ``` |
||
|
|
c9041beea3 | Migrate callsites from 'expectNotEmpty()' to 'expectNotNil()' | ||
|
|
243a35cd65 | Migrate callsites from 'expectEmpty()' to 'expectNil()' | ||
|
|
b8a475be72 |
StdlibUnittest: rename 'expectEmpty()' and 'expectNotEmpty()' to 'expectNil()' and 'expectNotNil()'
The new names are what people generally expect. The old names made more sense in the old times when the 'Optional.None' case could not be created with the 'nil' keyword. |
||
|
|
942392ad1c |
Merge pull request #4703 from practicalswift/swiftc-28405-swift-constraints-constraintsystem-resolveoverload
[swiftc (51 vs. 5162)] Add crasher in swift::constraints::ConstraintSystem::resolveOverload(...) |
||
|
|
09a00d01eb |
[swiftc (51 vs. 5162)] Add crasher in swift::constraints::ConstraintSystem::resolveOverload(...)
Add test case for crash triggered in `swift::constraints::ConstraintSystem::resolveOverload(...)`. Current number of unresolved compiler crashers: 51 (5162 resolved) Assertion failure in [`lib/Sema/ConstraintSystem.cpp (line 1592)`](https://github.com/apple/swift/blob/master/lib/Sema/ConstraintSystem.cpp#L1592): ``` Assertion `!refType->hasTypeParameter() && "Cannot have a dependent type here"' failed. When executing: void swift::constraints::ConstraintSystem::resolveOverload(swift::constraints::ConstraintLocator *, swift::Type, swift::constraints::OverloadChoice) ``` Assertion context: ``` return replaceSelfTypeInArchetype(archetype); } return type; }); } assert(!refType->hasTypeParameter() && "Cannot have a dependent type here"); // If we're binding to an init member, the 'throws' need to line up between // the bound and reference types. if (choice.isDecl()) { auto decl = choice.getDecl(); ``` Stack trace: ``` swift: /path/to/swift/lib/Sema/ConstraintSystem.cpp:1592: void swift::constraints::ConstraintSystem::resolveOverload(swift::constraints::ConstraintLocator *, swift::Type, swift::constraints::OverloadChoice): Assertion `!refType->hasTypeParameter() && "Cannot have a dependent type here"' failed. 8 swift 0x0000000000f732fc swift::constraints::ConstraintSystem::resolveOverload(swift::constraints::ConstraintLocator*, swift::Type, swift::constraints::OverloadChoice) + 4492 9 swift 0x0000000000fe0432 swift::constraints::ConstraintSystem::simplifyConstraint(swift::constraints::Constraint const&) + 882 10 swift 0x0000000000f6e957 swift::constraints::ConstraintSystem::addConstraint(swift::constraints::Constraint*, bool, bool) + 23 11 swift 0x0000000000f72109 swift::constraints::ConstraintSystem::addOverloadSet(swift::Type, llvm::ArrayRef<swift::constraints::OverloadChoice>, swift::constraints::ConstraintLocator*, swift::constraints::OverloadChoice*) + 377 12 swift 0x0000000000fdf01f swift::constraints::ConstraintSystem::simplifyMemberConstraint(swift::constraints::Constraint const&) + 623 13 swift 0x0000000000fe0105 swift::constraints::ConstraintSystem::simplifyConstraint(swift::constraints::Constraint const&) + 69 14 swift 0x0000000000f6e957 swift::constraints::ConstraintSystem::addConstraint(swift::constraints::Constraint*, bool, bool) + 23 15 swift 0x0000000000fdb76d swift::constraints::ConstraintSystem::simplifyConstructionConstraint(swift::Type, swift::FunctionType*, unsigned int, swift::FunctionRefKind, swift::constraints::ConstraintLocator*) + 557 16 swift 0x0000000000fdfd7b swift::constraints::ConstraintSystem::simplifyApplicableFnConstraint(swift::constraints::Constraint const&) + 907 17 swift 0x0000000000fe0402 swift::constraints::ConstraintSystem::simplifyConstraint(swift::constraints::Constraint const&) + 834 18 swift 0x0000000000f6e957 swift::constraints::ConstraintSystem::addConstraint(swift::constraints::Constraint*, bool, bool) + 23 22 swift 0x00000000010aa5eb swift::Expr::walk(swift::ASTWalker&) + 75 23 swift 0x0000000000fbb868 swift::constraints::ConstraintSystem::generateConstraints(swift::Expr*) + 200 24 swift 0x0000000000fe75dd swift::constraints::ConstraintSystem::solve(swift::Expr*&, swift::Type, swift::ExprTypeCheckListener*, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 77 25 swift 0x0000000000ec5d33 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 403 26 swift 0x0000000000ec9455 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 949 29 swift 0x0000000000f4a52a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346 30 swift 0x0000000000f4a38e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46 31 swift 0x0000000000f4af63 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179 33 swift 0x0000000000f045c1 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281 34 swift 0x0000000000c86e69 swift::CompilerInstance::performSema() + 3289 36 swift 0x00000000007e0947 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 37 swift 0x00000000007a8e08 main + 2984 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28405-swift-constraints-constraintsystem-resolveoverload.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28405-swift-constraints-constraintsystem-resolveoverload-c3526d.o 1. While type-checking 'a' at validation-test/compiler_crashers/28405-swift-constraints-constraintsystem-resolveoverload.swift:10:1 2. While type-checking expression at [validation-test/compiler_crashers/28405-swift-constraints-constraintsystem-resolveoverload.swift:10:21 - line:10:26] RangeText="{a<T>(" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
8fea568512 |
[SIL] Add test case for crash triggered in swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*)
Stack trace:
```
<stdin>:3:4: error: expected expression in list of expressions
if(import Swift
^
<stdin>:3:4: error: expected ',' separator
if(import Swift
^
,
<stdin>:3:4: error: expected ')' in expression list
if(import Swift
^
<stdin>:3:3: note: to match this opening '('
if(import Swift
^
<stdin>:3:4: error: expected '{' after 'if' condition
if(import Swift
^
sil-opt: /path/to/swift/lib/Sema/TypeCheckNameLookup.cpp:254: swift::LookupResult swift::TypeChecker::lookupMember(swift::DeclContext *, swift::Type, swift::DeclName, NameLookupOptions): Assertion `!type->is<TupleType>()' failed.
9 sil-opt 0x0000000000bb2386 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 5990
10 sil-opt 0x0000000000bb750e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4078
11 sil-opt 0x0000000000adf6f7 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 471
12 sil-opt 0x0000000000ae2dd5 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 949
13 sil-opt 0x0000000000ae7c74 swift::TypeChecker::typeCheckCondition(swift::Expr*&, swift::DeclContext*) + 180
14 sil-opt 0x0000000000ae7dcb swift::TypeChecker::typeCheckStmtCondition(llvm::MutableArrayRef<swift::StmtConditionElement>&, swift::DeclContext*, swift::Diag<>) + 251
17 sil-opt 0x0000000000b66cd6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
18 sil-opt 0x0000000000b1f3cd swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133
19 sil-opt 0x00000000007758a9 swift::CompilerInstance::performSema() + 3289
20 sil-opt 0x000000000075ec65 main + 1813
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. While type-checking expression at [<stdin>:3:3 - line:3:3] RangeText="("
```
|
||
|
|
b3030fc96e |
Merge pull request #4691 from apple/stdlib-existential-collection-fix
stdlib: type-erased collections: add forwarding for '_customContainsEquatableElement()' |
||
|
|
92c180031f |
stdlib: make 'Sequence.first(where:)' a pure protocol extension (no dynamic dispatch)
SE-0032 did not propose a protocol entry point, only a protocol extension. Using a pure protocol extension is the right choice here because a concrete sequence can't provide a more efficient implementation of this method than the default one. |
||
|
|
34a28c2637 | stdlib: add dispatch tests for 'drop(while:)' and 'prefix(while:)' | ||
|
|
ff4d282957 | ExistentialCollection.swift.gyb: make test names unique | ||
|
|
1e676d0d8c | stdlib: type-erased collections: add forwarding for '_customContainsEquatableElement()' | ||
|
|
d10146592d | Review comments. Round 5. Integration test for symbolicate-linux-fatal. | ||
|
|
b48b4d96fe | Merge remote-tracking branch 'origin/master' into master-next | ||
|
|
ef974af339 |
stdlib: disable an incorrect String comparison optimization on platforms that call ICU directly
... and add a test to ensure that the next attempt at writing this optimization won't introduce a regression. |
||
|
|
532cf06930 | stdlib: add convenience APIs to the SipHash implementation |