practicalswift
|
a317c6ac02
|
[swiftc (136 vs. 5234)] Add crasher in swift::TypeBase::getCanonicalType(...)
Add test case for crash triggered in `swift::TypeBase::getCanonicalType(...)`.
Current number of unresolved compiler crashers: 136 (5234 resolved)
/cc @lattner - just wanted to let you know that this crasher caused an assertion failure for the assertion `Result && "Case not implemented!"` added on 2011-03-22 by you in commit fd2bf74f :-)
Assertion failure in [`lib/AST/Type.cpp (line 1312)`](https://github.com/apple/swift/blob/master/lib/AST/Type.cpp#L1312):
```
Assertion `Result && "Case not implemented!"' failed.
When executing: swift::CanType swift::TypeBase::getCanonicalType()
```
Assertion context:
```
}
llvm_unreachable("Unknown type kind");
}
TypeBase *ParenType::getSinglyDesugaredType() {
return getUnderlyingType().getPointer();
}
TypeBase *NameAliasType::getSinglyDesugaredType() {
auto *TAD = getDecl();
```
Stack trace:
```
0 0x000000000348edb8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/path/to/swift/bin/swift+0x348edb8)
1 0x000000000348f4f6 SignalHandler(int) (/path/to/swift/bin/swift+0x348f4f6)
2 0x00007f495fcb53e0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x113e0)
3 0x00007f495e3e3428 gsignal /build/glibc-Qz8a69/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007f495e3e502a abort /build/glibc-Qz8a69/glibc-2.23/stdlib/abort.c:91:0
5 0x00007f495e3dbbd7 __assert_fail_base /build/glibc-Qz8a69/glibc-2.23/assert/assert.c:92:0
6 0x00007f495e3dbc82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
7 0x0000000000e33779 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0xe33779)
8 0x0000000000d33ad0 (anonymous namespace)::FindCapturedVars::checkType(swift::Type, swift::SourceLoc) (/path/to/swift/bin/swift+0xd33ad0)
9 0x0000000000d33f3a (anonymous namespace)::FindCapturedVars::walkToExprPre(swift::Expr*) (/path/to/swift/bin/swift+0xd33f3a)
10 0x0000000000dbcea5 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) (/path/to/swift/bin/swift+0xdbcea5)
11 0x0000000000dbeee5 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0xdbeee5)
12 0x0000000000dbeac0 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0xdbeac0)
13 0x0000000000dbb53e swift::Stmt::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0xdbb53e)
14 0x0000000000d32c64 swift::TypeChecker::computeCaptures(swift::AnyFunctionRef) (/path/to/swift/bin/swift+0xd32c64)
15 0x0000000000d355a7 (anonymous namespace)::FindCapturedVars::propagateCaptures(swift::AnyFunctionRef, swift::SourceLoc) (/path/to/swift/bin/swift+0xd355a7)
16 0x0000000000d3432a (anonymous namespace)::FindCapturedVars::walkToExprPre(swift::Expr*) (/path/to/swift/bin/swift+0xd3432a)
17 0x0000000000dbe9c9 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0xdbe9c9)
18 0x0000000000dbb53e swift::Stmt::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0xdbb53e)
19 0x0000000000d32c64 swift::TypeChecker::computeCaptures(swift::AnyFunctionRef) (/path/to/swift/bin/swift+0xd32c64)
20 0x0000000000c5fdeb typeCheckFunctionsAndExternalDecls(swift::TypeChecker&) (/path/to/swift/bin/swift+0xc5fdeb)
21 0x0000000000c604f9 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) (/path/to/swift/bin/swift+0xc604f9)
22 0x00000000009808a6 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x9808a6)
23 0x000000000047d3e6 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x47d3e6)
24 0x000000000047c2ec swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x47c2ec)
25 0x000000000043ac17 main (/path/to/swift/bin/swift+0x43ac17)
26 0x00007f495e3ce830 __libc_start_main /build/glibc-Qz8a69/glibc-2.23/csu/../csu/libc-start.c:325:0
27 0x0000000000438059 _start (/path/to/swift/bin/swift+0x438059)
```
|
2016-12-05 22:00:20 +01:00 |
|