practicalswift
|
64a832e950
|
[swiftc (149 vs. 5199)] Add crasher in swift::TypeBase::getCanonicalType(...)
Add test case for crash triggered in `swift::TypeBase::getCanonicalType(...)`.
Current number of unresolved compiler crashers: 149 (5199 resolved)
Assertion failure in [`lib/AST/Type.cpp (line 1286)`](https://github.com/apple/swift/blob/master/lib/AST/Type.cpp#L1286):
```
Assertion `Result && "Case not implemented!"' failed.
When executing: swift::CanType swift::TypeBase::getCanonicalType()
```
Assertion context:
```
}
}
// Cache the canonical type for future queries.
assert(Result && "Case not implemented!");
CanonicalType = Result;
return CanType(Result);
}
```
Stack trace:
```
0 0x00000000033b35c8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/path/to/swift/bin/swift+0x33b35c8)
1 0x00000000033b3d06 SignalHandler(int) (/path/to/swift/bin/swift+0x33b3d06)
2 0x00007ff5ca8ce3e0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x113e0)
3 0x00007ff5c8ffc428 gsignal /build/glibc-Qz8a69/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007ff5c8ffe02a abort /build/glibc-Qz8a69/glibc-2.23/stdlib/abort.c:91:0
5 0x00007ff5c8ff4bd7 __assert_fail_base /build/glibc-Qz8a69/glibc-2.23/assert/assert.c:92:0
6 0x00007ff5c8ff4c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
7 0x0000000000e29801 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0xe29801)
8 0x0000000000d2abf3 (anonymous namespace)::FindCapturedVars::checkType(swift::Type, swift::SourceLoc) (/path/to/swift/bin/swift+0xd2abf3)
9 0x0000000000d2adfa (anonymous namespace)::FindCapturedVars::walkToExprPre(swift::Expr*) (/path/to/swift/bin/swift+0xd2adfa)
10 0x0000000000db3775 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) (/path/to/swift/bin/swift+0xdb3775)
11 0x0000000000db57b5 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0xdb57b5)
12 0x0000000000db5390 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0xdb5390)
13 0x0000000000db5905 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0xdb5905)
14 0x0000000000db5390 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0xdb5390)
15 0x0000000000db1e0e swift::Stmt::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0xdb1e0e)
16 0x0000000000d29db0 swift::TypeChecker::computeCaptures(swift::AnyFunctionRef) (/path/to/swift/bin/swift+0xd29db0)
17 0x0000000000d2c437 (anonymous namespace)::FindCapturedVars::propagateCaptures(swift::AnyFunctionRef, swift::SourceLoc) (/path/to/swift/bin/swift+0xd2c437)
18 0x0000000000d2b1ea (anonymous namespace)::FindCapturedVars::walkToExprPre(swift::Expr*) (/path/to/swift/bin/swift+0xd2b1ea)
19 0x0000000000db5299 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0xdb5299)
20 0x0000000000db1e0e swift::Stmt::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0xdb1e0e)
21 0x0000000000d29db0 swift::TypeChecker::computeCaptures(swift::AnyFunctionRef) (/path/to/swift/bin/swift+0xd29db0)
22 0x0000000000c59973 typeCheckFunctionsAndExternalDecls(swift::TypeChecker&) (/path/to/swift/bin/swift+0xc59973)
23 0x0000000000c5a039 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) (/path/to/swift/bin/swift+0xc5a039)
24 0x0000000000978fb6 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x978fb6)
25 0x000000000047b02c performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x47b02c)
26 0x0000000000479f1e swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x479f1e)
27 0x0000000000439a17 main (/path/to/swift/bin/swift+0x439a17)
28 0x00007ff5c8fe7830 __libc_start_main /build/glibc-Qz8a69/glibc-2.23/csu/../csu/libc-start.c:325:0
29 0x0000000000436e59 _start (/path/to/swift/bin/swift+0x436e59)
```
|
2016-11-22 20:37:28 +01:00 |
|