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-2114] Compiler Segfault Regression (Xcode 8 beta 2 to 3) #44722

Closed
stephencelis opened this issue Jul 19, 2016 · 4 comments
Closed

[SR-2114] Compiler Segfault Regression (Xcode 8 beta 2 to 3) #44722

stephencelis opened this issue Jul 19, 2016 · 4 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 3.0

Comments

@stephencelis
Copy link
Contributor

Previous ID SR-2114
Radar None
Original Reporter @stephencelis
Type Bug
Environment

macOS Sierra beta 3, Xcode 8 beta 3, Swift 3

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

md5: 1a7bf6e483927557fa28c5920328bec5

Issue Description:

The following repo built fine in Xcode 8 beta 2 (besides an issue with generic typealiases on a branch, reported here: https://bugs.swift.org/browse/SR-2076), but in Xcode 8 beta 3 the compiler quickly segfaults:

https://github.com/stephencelis/Formatting

0  swift                    0x0000000104ce728b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  swift                    0x0000000104ce6576 llvm::sys::RunSignalHandlers() + 70
2  swift                    0x0000000104ce78df SignalHandler(int) + 287
3  libsystem_platform.dylib 0x0000000107d4cd7a _sigtramp + 26
4  libsystem_platform.dylib 000000000000000000 _sigtramp + 4163580576
5  swift                    0x0000000102bd47dd swift::ModuleFile::getType(llvm::PointerEmbeddedInt<unsigned int, 31>) + 2237
6  swift                    0x0000000102bd47a8 swift::ModuleFile::getType(llvm::PointerEmbeddedInt<unsigned int, 31>) + 2184
7  swift                    0x0000000102bd535c swift::ModuleFile::getType(llvm::PointerEmbeddedInt<unsigned int, 31>) + 5180
8  swift                    0x0000000102bd47bd swift::ModuleFile::getType(llvm::PointerEmbeddedInt<unsigned int, 31>) + 2205
9  swift                    0x0000000102bd49ba swift::ModuleFile::getType(llvm::PointerEmbeddedInt<unsigned int, 31>) + 2714
10 swift                    0x0000000102bd2e57 swift::ModuleFile::getDecl(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 26647
11 swift                    0x0000000102bf3c7b swift::ModuleFile::getTopLevelDecls(llvm::SmallVectorImpl<swift::Decl*>&) + 971
12 swift                    0x0000000102f2c58f swift::ModuleDecl::getTopLevelDecls(llvm::SmallVectorImpl<swift::Decl*>&) const + 63
13 swift                    0x000000010290647e swift::ClassHierarchyAnalysis::init() + 78
14 swift                    0x00000001028fbe61 swift::createClassHierarchyAnalysis(swift::SILModule*) + 129
15 swift                    0x000000010297f889 swift::SILPassManager::SILPassManager(swift::SILModule*, llvm::StringRef) + 361
16 swift                    0x0000000102988f36 swift::runSILDiagnosticPasses(swift::SILModule&) + 118
17 swift                    0x000000010272fcc7 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) + 11495
18 swift                    0x000000010272c0d2 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2898
19 swift                    0x00000001026fa154 main + 2884
20 libdyld.dylib            0x0000000107a27255 start + 1
21 libdyld.dylib            0x000000000000002d start + 4166880729
Stack dump:
0.  Program arguments: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-module /Users/stephencelis/Library/Developer/Xcode/DerivedData/Formatting-aqzhjqxlluahchdgutyrqitfpstv/Build/Intermediates/Formatting.build/Debug-iphonesimulator/Formatting.build/Objects-normal/x86_64/Date~partial.swiftmodule /Users/stephencelis/Library/Developer/Xcode/DerivedData/Formatting-aqzhjqxlluahchdgutyrqitfpstv/Build/Intermediates/Formatting.build/Debug-iphonesimulator/Formatting.build/Objects-normal/x86_64/Formatter~partial.swiftmodule /Users/stephencelis/Library/Developer/Xcode/DerivedData/Formatting-aqzhjqxlluahchdgutyrqitfpstv/Build/Intermediates/Formatting.build/Debug-iphonesimulator/Formatting.build/Objects-normal/x86_64/Uncurry~partial.swiftmodule /Users/stephencelis/Library/Developer/Xcode/DerivedData/Formatting-aqzhjqxlluahchdgutyrqitfpstv/Build/Intermediates/Formatting.build/Debug-iphonesimulator/Formatting.build/Objects-normal/x86_64/Formatters~partial.swiftmodule /Users/stephencelis/Library/Developer/Xcode/DerivedData/Formatting-aqzhjqxlluahchdgutyrqitfpstv/Build/Intermediates/Formatting.build/Debug-iphonesimulator/Formatting.build/Objects-normal/x86_64/Operators~partial.swiftmodule -parse-as-library -target x86_64-apple-ios10.0 -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk -I /Users/stephencelis/Library/Developer/Xcode/DerivedData/Formatting-aqzhjqxlluahchdgutyrqitfpstv/Build/Products/Debug-iphonesimulator -F /Users/stephencelis/Library/Developer/Xcode/DerivedData/Formatting-aqzhjqxlluahchdgutyrqitfpstv/Build/Products/Debug-iphonesimulator -F /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -enable-testing -g -module-cache-path /Users/stephencelis/Library/Developer/Xcode/DerivedData/ModuleCache -D Xcode -serialize-debugging-options -Xcc -I/Users/stephencelis/Library/Developer/Xcode/DerivedData/Formatting-aqzhjqxlluahchdgutyrqitfpstv/Build/Intermediates/Formatting.build/Debug-iphonesimulator/Formatting.build/swift-overrides.hmap -Xcc -I/Users/stephencelis/Library/Developer/Xcode/DerivedData/Formatting-aqzhjqxlluahchdgutyrqitfpstv/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/stephencelis/Library/Developer/Xcode/DerivedData/Formatting-aqzhjqxlluahchdgutyrqitfpstv/Build/Intermediates/Formatting.build/Debug-iphonesimulator/Formatting.build/DerivedSources/x86_64 -Xcc -I/Users/stephencelis/Library/Developer/Xcode/DerivedData/Formatting-aqzhjqxlluahchdgutyrqitfpstv/Build/Intermediates/Formatting.build/Debug-iphonesimulator/Formatting.build/DerivedSources -Xcc -working-directory/Users/stephencelis/Developer/Formatting -emit-module-doc-path /Users/stephencelis/Library/Developer/Xcode/DerivedData/Formatting-aqzhjqxlluahchdgutyrqitfpstv/Build/Intermediates/Formatting.build/Debug-iphonesimulator/Formatting.build/Objects-normal/x86_64/Formatting.swiftdoc -module-name Formatting -emit-objc-header-path /Users/stephencelis/Library/Developer/Xcode/DerivedData/Formatting-aqzhjqxlluahchdgutyrqitfpstv/Build/Intermediates/Formatting.build/Debug-iphonesimulator/Formatting.build/Objects-normal/x86_64/Formatting-Swift.h -o /Users/stephencelis/Library/Developer/Xcode/DerivedData/Formatting-aqzhjqxlluahchdgutyrqitfpstv/Build/Intermediates/Formatting.build/Debug-iphonesimulator/Formatting.build/Objects-normal/x86_64/Formatting.swiftmodule 
1.  While reading from /Users/stephencelis/Library/Developer/Xcode/DerivedData/Formatting-aqzhjqxlluahchdgutyrqitfpstv/Build/Intermediates/Formatting.build/Debug-iphonesimulator/Formatting.build/Objects-normal/x86_64/Date~partial.swiftmodule
2.  While deserializing 'QQQQ' (FuncDecl #&#8203;44) 
@belkadan
Copy link
Contributor

@belkadan
Copy link
Contributor

@slavapestov, this is similar to something you fixed recently, right?

@belkadan
Copy link
Contributor

I would guess this is fixed in master—QQQQ uses a generic typealias itself.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@stephencelis
Copy link
Contributor Author

Going to close this as it's super stale at this point.

@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
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 3.0
Projects
None yet
Development

No branches or pull requests

3 participants