Skip to content

[SR-3743] Compiler crash in Unbox package #46328

@aciidgh

Description

@aciidgh
Previous ID SR-3743
Radar None
Original Reporter @aciidb0mb3r
Type Bug
Status Resolved
Resolution Cannot Reproduce
Environment

swift-DEVELOPMENT-SNAPSHOT-2017-01-24-a (macOS, linux)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 3.1Regression, CompilerCrash
Assignee None
Priority Medium

md5: 04559cb59dd0376e6e5aa8e5bd39072f

Issue Description:

$ git clone https://github.com/JohnSundell/Unbox
$ git checkout 2.3.0
$ swift build

Compile Swift Module 'Unbox' (1 sources)
Assertion failed: (isCanonicalTypeInContext(result, builder)), function getCanonicalTypeInContext, file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/lib/AST/GenericSignature.cpp, line 627.
0  swift                    0x000000010e305558 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  swift                    0x000000010e304736 llvm::sys::RunSignalHandlers() + 86
2  swift                    0x000000010e305bf9 SignalHandler(int) + 361
3  libsystem_platform.dylib 0x00007fff9e416bba _sigtramp + 26
4  libsystem_platform.dylib 000000000000000000 _sigtramp + 1639879776
5  libsystem_c.dylib        0x00007fff9e29d420 abort + 129
6  libsystem_c.dylib        0x00007fff9e264893 basename_r + 0
7  swift                    0x000000010bfa6953 swift::GenericSignature::getCanonicalTypeInContext(swift::Type, swift::ArchetypeBuilder&) + 195
8  swift                    0x000000010bfa69d1 swift::GenericSignature::getCanonicalTypeInContext(swift::Type, swift::ModuleDecl&) + 81
9  swift                    0x000000010bfe2318 swift::TypeBase::getCanonicalType() + 1912
10 swift                    0x000000010bf7e630 swift::ValueDecl::getOverloadSignature() const + 640
11 swift                    0x000000010be4a1cd (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 2541
12 swift                    0x000000010be44598 swift::TypeChecker::validateDecl(swift::ValueDecl*) + 2632
13 swift                    0x000000010be4a270 (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 2704
14 swift                    0x000000010be44598 swift::TypeChecker::validateDecl(swift::ValueDecl*) + 2632
15 swift                    0x000000010be4a270 (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 2704
16 swift                    0x000000010be44598 swift::TypeChecker::validateDecl(swift::ValueDecl*) + 2632
17 swift                    0x000000010be4a270 (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 2704
18 swift                    0x000000010be44598 swift::TypeChecker::validateDecl(swift::ValueDecl*) + 2632
19 swift                    0x000000010be4a270 (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 2704
20 swift                    0x000000010be56b8b (anonymous namespace)::DeclChecker::visitClassDecl(swift::ClassDecl*) + 331
21 swift                    0x000000010be499c6 (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 486
22 swift                    0x000000010be497c7 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 103
23 swift                    0x000000010bebf6b4 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1460
24 swift                    0x000000010baaf3dc swift::CompilerInstance::performSema() + 4012
25 swift                    0x000000010b01f530 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3600
26 swift                    0x000000010afdab11 main + 3025
27 libdyld.dylib            0x00007fff9e209255 start + 1
Stack dump:
0.  Program arguments: /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2017-01-24-a.xctoolchain/usr/bin/swift -frontend -c -primary-file /private/tmp/Unbox/Sources/Unbox.swift -target x86_64-apple-macosx10.10 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I /private/tmp/Unbox/.build/debug -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -enable-testing -g -module-cache-path /private/tmp/Unbox/.build/debug/ModuleCache -D SWIFT_PACKAGE -emit-module-doc-path /private/tmp/Unbox/.build/debug/Unbox.build/Unbox~partial.swiftdoc -Onone -parse-as-library -module-name Unbox -emit-module-path /private/tmp/Unbox/.build/debug/Unbox.build/Unbox~partial.swiftmodule -emit-dependencies-path /private/tmp/Unbox/.build/debug/Unbox.build/Unbox.d -emit-reference-dependencies-path /private/tmp/Unbox/.build/debug/Unbox.build/Unbox.swiftdeps -num-threads 8 -o /private/tmp/Unbox/.build/debug/Unbox.build/Unbox.swift.o
1.  While type-checking 'Unboxer' at /private/tmp/Unbox/Sources/Unbox.swift:530:14
2.  While type-checking 'unbox' at /private/tmp/Unbox/Sources/Unbox.swift:568:12
3.  While validating 'unbox' at /private/tmp/Unbox/Sources/Unbox.swift:573:12
4.  While type-checking 'unbox' at /private/tmp/Unbox/Sources/Unbox.swift:573:12
5.  While validating 'unbox' at /private/tmp/Unbox/Sources/Unbox.swift:579:12
6.  While type-checking 'unbox' at /private/tmp/Unbox/Sources/Unbox.swift:579:12
7.  While validating 'unbox' at /private/tmp/Unbox/Sources/Unbox.swift:584:12
8.  While type-checking 'unbox' at /private/tmp/Unbox/Sources/Unbox.swift:584:12
9.  While validating 'unbox' at /private/tmp/Unbox/Sources/Unbox.swift:589:12
10. While type-checking 'unbox' at /private/tmp/Unbox/Sources/Unbox.swift:589:12
<unknown>:0: error: unable to execute command: Abort trap: 6
<unknown>:0: error: compile command failed due to signal 6 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2017-01-24-a.xctoolchain/usr/bin/swift-build-tool -f /private/tmp/Unbox/.build/debug.yaml

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of software

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions