-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[swiftc (134 vs. 5225)] Add crasher in swift::ArchetypeBuilder::mapTypeOutOfContext #6016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
practicalswift
merged 1 commit into
swiftlang:master
from
practicalswift:swiftc-28548-cantype-hastypeparameter-already-have-an-interface-type
Dec 2, 2016
Merged
[swiftc (134 vs. 5225)] Add crasher in swift::ArchetypeBuilder::mapTypeOutOfContext #6016
practicalswift
merged 1 commit into
swiftlang:master
from
practicalswift:swiftc-28548-cantype-hastypeparameter-already-have-an-interface-type
Dec 2, 2016
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…peOutOfContext Add test case for crash triggered in `swift::ArchetypeBuilder::mapTypeOutOfContext`. Current number of unresolved compiler crashers: 134 (5225 resolved) Assertion failure in [`lib/AST/ArchetypeBuilder.cpp (line 2147)`](https://github.com/apple/swift/blob/master/lib/AST/ArchetypeBuilder.cpp#L2147): ``` Assertion `!canType->hasTypeParameter() && "already have an interface type"' failed. When executing: static swift::Type swift::ArchetypeBuilder::mapTypeOutOfContext(swift::ModuleDecl *, swift::GenericEnvironment *, swift::Type) ``` Assertion context: ``` ArrayRef<GenericTypeParamType *> params, SmallVectorImpl<Requirement> &requirements) { builder.enumerateRequirements([&](RequirementKind kind, ArchetypeBuilder::PotentialArchetype *archetype, llvm::PointerUnion<Type, ArchetypeBuilder::PotentialArchetype *> type, RequirementSource source) { // Filter out redundant requirements. switch (source.getKind()) { case RequirementSource::Explicit: case RequirementSource::Inferred: // The requirement was explicit and required, keep it. ``` Stack trace: ``` 0 0x00000000033bb388 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/path/to/swift/bin/swift+0x33bb388) 1 0x00000000033bbac6 SignalHandler(int) (/path/to/swift/bin/swift+0x33bbac6) 2 0x00007f440a74f3e0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x113e0) 3 0x00007f4408e7d428 gsignal /build/glibc-Qz8a69/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0 4 0x00007f4408e7f02a abort /build/glibc-Qz8a69/glibc-2.23/stdlib/abort.c:91:0 5 0x00007f4408e75bd7 __assert_fail_base /build/glibc-Qz8a69/glibc-2.23/assert/assert.c:92:0 6 0x00007f4408e75c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82) 7 0x0000000000d42751 swift::ArchetypeBuilder::mapTypeOutOfContext(swift::DeclContext const*, swift::Type) (/path/to/swift/bin/swift+0xd42751) 8 0x0000000000c15647 getResultType(swift::TypeChecker&, swift::FuncDecl*, swift::Type) (/path/to/swift/bin/swift+0xc15647) 9 0x0000000000c14d1b swift::TypeChecker::configureInterfaceType(swift::AbstractFunctionDecl*, swift::GenericSignature*) (/path/to/swift/bin/swift+0xc14d1b) 10 0x0000000000c1472a swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*) (/path/to/swift/bin/swift+0xc1472a) 11 0x0000000000bfbaa4 (anonymous namespace)::DeclChecker::visitFuncDecl(swift::FuncDecl*) (/path/to/swift/bin/swift+0xbfbaa4) 12 0x0000000000bea2fa (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0xbea2fa) 13 0x0000000000be4570 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) (/path/to/swift/bin/swift+0xbe4570) 14 0x0000000000ce6a22 swift::addTrivialAccessorsToStorage(swift::AbstractStorageDecl*, swift::TypeChecker&) (/path/to/swift/bin/swift+0xce6a22) 15 0x0000000000ce85a0 swift::maybeAddAccessorsToVariable(swift::VarDecl*, swift::TypeChecker&) (/path/to/swift/bin/swift+0xce85a0) 16 0x0000000000be480b swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) (/path/to/swift/bin/swift+0xbe480b) 17 0x0000000000bff289 (anonymous namespace)::DeclChecker::visitBoundVariable(swift::VarDecl*) (/path/to/swift/bin/swift+0xbff289) 18 0x0000000000e2344f swift::Pattern::forEachVariable(std::function<void (swift::VarDecl*)> const&) const (/path/to/swift/bin/swift+0xe2344f) 19 0x0000000000bea392 (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0xbea392) 20 0x0000000000bf834b (anonymous namespace)::DeclChecker::visitClassDecl(swift::ClassDecl*) (/path/to/swift/bin/swift+0xbf834b) 21 0x0000000000bea19b (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0xbea19b) 22 0x0000000000bf911b (anonymous namespace)::DeclChecker::visitProtocolDecl(swift::ProtocolDecl*) (/path/to/swift/bin/swift+0xbf911b) 23 0x0000000000bea2ca (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0xbea2ca) 24 0x0000000000bea0fd swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) (/path/to/swift/bin/swift+0xbea0fd) 25 0x0000000000c5c6d2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) (/path/to/swift/bin/swift+0xc5c6d2) 26 0x000000000097b226 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x97b226) 27 0x000000000047c1e6 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x47c1e6) 28 0x000000000047b0ee swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x47b0ee) 29 0x0000000000439a17 main (/path/to/swift/bin/swift+0x439a17) 30 0x00007f4408e68830 __libc_start_main /build/glibc-Qz8a69/glibc-2.23/csu/../csu/libc-start.c:325:0 31 0x0000000000436e59 _start (/path/to/swift/bin/swift+0x436e59) ```
@swift-ci please smoke test and merge |
@swift-ci please test and merge |
/cc @slavapestov – just wanted to let you know that this crash case caused an assertion failure for an assertion you added on 2016-08-25 ( |
Nice catch :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add test case for crash triggered in
swift::ArchetypeBuilder::mapTypeOutOfContext
.Current number of unresolved compiler crashers: 134 (5225 resolved)
Assertion failure in
lib/AST/ArchetypeBuilder.cpp (line 2147)
:Assertion context:
Stack trace: