Skip to content
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

[SR-5219] "swift build" crashes with Segmentation Fault 11 #47795

Closed
swift-ci opened this issue Jun 14, 2017 · 2 comments
Closed

[SR-5219] "swift build" crashes with Segmentation Fault 11 #47795

swift-ci opened this issue Jun 14, 2017 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software regression swift 4.0

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-5219
Radar rdar://problem/32774779
Original Reporter emaloney (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

This occurs on macOS 10.12.5 using the June 12th snapshot of the developer tools:

$ swift --version
Apple Swift version 4.0-dev (LLVM 1a08ef2104, Clang e92999bccb, Swift 94e6b9d46c)
Target: x86_64-apple-macosx10.9

$ swift build --version
Swift Package Manager - Swift 4.0.0-dev
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 4.0Regression, CompilerCrash
Assignee None
Priority Medium

md5: 7242f8bef36efe623d5a8e6189ab6b2d

Issue Description:

When running swift build using the June 12 snaphot, I am encountering a Segmentation Fault 11 crash:

$ swift build
Compile Swift Module 'CleanroomDataTransactions' (15 sources)
0  swift                    0x0000000104fd8648 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  swift                    0x0000000104fd7616 llvm::sys::RunSignalHandlers() + 86
2  swift                    0x0000000104fd8c09 SignalHandler(int) + 361
3  libsystem_platform.dylib 0x00007fffcef0ab3a _sigtramp + 26
4  libsystem_platform.dylib 0x00007f8132116000 _sigtramp + 1663087840
5  swift                    0x0000000102d5a386 (anonymous namespace)::Verifier::verifyChecked(swift::ApplyExpr*) + 86
6  swift                    0x0000000102d51af1 (anonymous namespace)::Verifier::walkToExprPost(swift::Expr*) + 13137
7  swift                    0x0000000102d6353a swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) + 1002
8  swift                    0x0000000102d6330d swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) + 445
9  swift                    0x0000000102d65850 (anonymous namespace)::Traversal::visitAbstractFunctionDecl(swift::AbstractFunctionDecl*) + 704
10 swift                    0x0000000102d5eb47 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 327
11 swift                    0x0000000102d65544 (anonymous namespace)::Traversal::visitNominalTypeDecl(swift::NominalTypeDecl*) + 452
12 swift                    0x0000000102d5eb3a (anonymous namespace)::Traversal::doIt(swift::Decl*) + 314
13 swift                    0x0000000102d5e9eb swift::Decl::walk(swift::ASTWalker&) + 27
14 swift                    0x0000000102d4dd2d swift::verify(swift::Decl*) + 157
15 swift                    0x0000000102a51ea8 swift::ClangImporter::verifyAllModules() + 472
16 swift                    0x0000000102ce2a09 swift::ASTContext::verifyAllLoadedModules() const + 57
17 swift                    0x0000000102cd1041 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 2113
18 swift                    0x0000000102822279 swift::CompilerInstance::performSema() + 3881
19 swift                    0x0000000101db9d8f performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 2431
20 swift                    0x0000000101db833a swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2650
21 swift                    0x0000000101d745b0 main + 3312
22 libdyld.dylib            0x00007fffcecfb235 start + 1
23 libdyld.dylib            0x0000000000000034 start + 825249280
Stack dump:
0.  Program arguments: /Library/Developer/Toolchains/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-06-12-a.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/Sources/DataTransaction.swift /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/Sources/DataTransactionError.swift /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/Sources/DispatchQueueExtension.swift /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/Sources/EncodingExtensions.swift /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/Sources/FetchImageTransaction.swift /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/Sources/HTTPRequestMethod.swift /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/Sources/HTTPResponseMetadata.swift /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/Sources/HTTPResponseStatus.swift /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/Sources/HTTPTransaction.swift /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/Sources/ImageConstruction.swift /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/Sources/JSONExtractionExtensions.swift /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/Sources/JSONKey.swift /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/Sources/JSONTransaction.swift /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/Sources/JSONTypes.swift /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/Sources/MIMEType.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 /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/.build/debug -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -enable-testing -g -module-cache-path /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/.build/debug/ModuleCache -swift-version 4 -D SWIFT_PACKAGE -emit-module-doc-path /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/.build/debug/CleanroomDataTransactions.build/DataTransaction~partial.swiftdoc -Onone -parse-as-library -module-name CleanroomDataTransactions -emit-module-path /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/.build/debug/CleanroomDataTransactions.build/DataTransaction~partial.swiftmodule -emit-dependencies-path /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/.build/debug/CleanroomDataTransactions.build/DataTransaction.d -emit-reference-dependencies-path /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/.build/debug/CleanroomDataTransactions.build/DataTransaction.swiftdeps -num-threads 8 -o /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/.build/debug/CleanroomDataTransactions.build/DataTransaction.swift.o 
1.  While walking into body of getter for NSKeyValueUnionSetMutation in module 'Foundation'
2.  While verifying ApplyExpr expression at [<invalid loc> - <invalid loc>]
<unknown>:0: error: unable to execute command: Segmentation fault: 11
<unknown>:0: error: compile command failed due to signal 11 (use -v to see invocation)
error: terminated(1): /Library/Developer/Toolchains/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-06-12-a.xctoolchain/usr/bin/swift-build-tool -f /Users/emaloney/Documents/Code/managed/CleanroomDataTransactions/.build/debug.yaml

This occurs when building against release 2.0.0 (current master) of:

https://github.com/emaloney/CleanroomDataTransactions

@belkadan
Copy link
Contributor

@swift-ci create

@belkadan
Copy link
Contributor

Doug fixed this back in Swift 4.0 with #10389

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software regression swift 4.0
Projects
None yet
Development

No branches or pull requests

3 participants