Open swift-ci opened 8 years ago
I think we're going to need the whole project to track this one down.
Comment by tanner0101 (JIRA)
I've confirmed this is still happening on 08-26.
https://github.com/vapor/vapor/files/440393/vapor.copy.zip
Here is the zipped project. I deleted the `Packages` and `.build` folder so the file size is smaller. Running `swift build` on anything higher than `08-18` on macOS El cap should reproduce the crash.
Here was my last test of compiling it:
swift build
....
...
...
Compile Swift Module 'Performance' (1 sources)
Compile Swift Module 'Development' (3 sources)
Linking ./.build/debug/Performance
Assertion failed: (Val && "isa<> used on a null pointer"), function doit, file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/llvm/include/llvm/Support/Casting.h, line 95.
0 swift 0x000000010d1b730b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1 swift 0x000000010d1b6556 llvm::sys::RunSignalHandlers() + 70
2 swift 0x000000010d1b7a5f SignalHandler(int) + 383
3 libsystem_platform.dylib 0x00007fff8b99552a _sigtramp + 26
4 swift 0x000000010ddb1621 cmark_strbuf__initbuf + 74160
5 swift 0x000000010d1b77ae abort + 14
6 swift 0x000000010d1b7791 __assert_rtn + 81
7 swift 0x000000010ad4acaa (anonymous namespace)::TypeAccessScopeChecker::walkToTypePre(swift::Type) + 570
8 swift 0x000000010af2013b swift::TypeVisitor<(anonymous namespace)::Traversal, bool>::visit(swift::Type) + 619
9 swift 0x000000010af20c89 swift::TypeVisitor<(anonymous namespace)::Traversal, bool>::visit(swift::Type) + 3513
10 swift 0x000000010af1fe4d swift::Type::walk(swift::TypeWalker&) const + 61
11 swift 0x000000010ad4a37d (anonymous namespace)::TypeAccessScopeChecker::getAccessScope(swift::Type, swift::DeclContext const*, llvm::DenseMap<swift::SourceFile const*, llvm::DenseMap<swift::Type, swift::DeclContext const*, llvm::DenseMapInfo<swift::Type>, llvm::detail::DenseMapPair<swift::Type, swift::DeclContext const*> >, llvm::DenseMapInfo<swift::SourceFile const*>, llvm::detail::DenseMapPair<swift::SourceFile const*, llvm::DenseMap<swift::Type, swift::DeclContext const*, llvm::DenseMapInfo<swift::Type>, llvm::detail::DenseMapPair<swift::Type, swift::DeclContext const*> > > >&) + 141
12 swift 0x000000010ad5a84e std::__1::__function::__func<checkAccessibility(swift::TypeChecker&, swift::Decl const*)::$_14, std::__1::allocator<checkAccessibility(swift::TypeChecker&, swift::Decl const*)::$_14>, void (swift::Pattern*)>::operator()(swift::Pattern*&&) + 414
13 swift 0x000000010af00252 swift::Pattern::forEachNode(std::__1::function<void (swift::Pattern*)> const&) + 34
14 swift 0x000000010ad56b93 checkAccessibility(swift::TypeChecker&, swift::Decl const*) + 243
15 swift 0x000000010ad4437c (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 1468
16 swift 0x000000010ad43dac swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 156
17 swift 0x000000010adacd96 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) + 454
18 swift 0x000000010adac7bc swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 140
19 swift 0x000000010ad66f7c swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1420
20 swift 0x000000010aa03b10 swift::CompilerInstance::performSema() + 3664
21 swift 0x000000010a4f8171 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3185
22 swift 0x000000010a4b8320 main + 2544
23 libdyld.dylib 0x00007fff91d6b5ad start + 1
Stack dump:
0. Program arguments: /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/tanner/Developer/vapor/vapor/Sources/Development/main.swift /Users/tanner/Developer/vapor/vapor/Sources/Development/Controllers/UserController.swift /Users/tanner/Developer/vapor/vapor/Sources/Development/Models/User.swift -target x86_64-apple-macosx10.10 -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I /Users/tanner/Developer/vapor/vapor/.build/debug -F /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -enable-testing -g -module-cache-path /Users/tanner/Developer/vapor/vapor/.build/debug/ModuleCache -D SWIFT_PACKAGE -Xcc -fmodule-map-file=/Users/tanner/Developer/vapor/vapor/.build/debug/CLibreSSL.build/module.modulemap -emit-module-doc-path /Users/tanner/Developer/vapor/vapor/.build/debug/Development.build/main~partial.swiftdoc -Onone -module-name Development -emit-module-path /Users/tanner/Developer/vapor/vapor/.build/debug/Development.build/main~partial.swiftmodule -emit-dependencies-path /Users/tanner/Developer/vapor/vapor/.build/debug/Development.build/main.d -emit-reference-dependencies-path /Users/tanner/Developer/vapor/vapor/.build/debug/Development.build/main.swiftdeps -num-threads 8 -o /Users/tanner/Developer/vapor/vapor/.build/debug/Development.build/main.swift.o
1. While type-checking declaration 0x7fafdacdc968 at /Users/tanner/Developer/vapor/vapor/Sources/Development/main.swift:107:1
<unknown>:0: error: unable to execute command: Illegal instruction: 4
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/bin/swift-build-tool -f /Users/tanner/Developer/vapor/vapor/.build/debug.yaml
The crash, like it says, is in Sources/Development/main.swift at line 107
There's a lot of cross-module protocols, extensions, and generics going on here so I'm not surprised to see it breaking.
Thanks for looking into this!
This seems like the same crash as in SR-4850. Are they related?
No, isa
is just a helper function. Think of this like a null pointer dereference.
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, CompilerCrash | |Assignee | @slavapestov | |Priority | Medium | md5: c2ffc64b656a1ebb4e6e3632949e0c01Issue Description:
Snapshot 08-18, 08-23, and 08-24 on macOS El Cap.
When calling:
I believe it is conflicting with another protocol extension:
Adding an external label to either fixes the issue for now.