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-10327] Compiler SegFailt in Swift 5 #52727

Closed
0xTim opened this issue Apr 6, 2019 · 5 comments
Closed

[SR-10327] Compiler SegFailt in Swift 5 #52727

0xTim opened this issue Apr 6, 2019 · 5 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

Comments

@0xTim
Copy link

0xTim commented Apr 6, 2019

Previous ID SR-10327
Radar rdar://problem/49699547
Original Reporter @0xTim
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Apple Swift version 5.0 (swiftlang-1001.0.69.5 clang-1001.0.46.3)

Target: x86_64-apple-darwin18.5.0

Xcode 10.2

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

md5: 55769c758994de715dcfb7bd27e38747

Issue Description:

When trying to build a project that extends a public class that lives in another module I get a compiler segfault.

Steps to reproduce

**1. Download attached project

2. Navigate to TILApp directory

3. Run swift build

Expected Results

Code compiles successfully (I'm pretty sure this should compile) or show compiler error message

Actual results

Segmentation Fault: 11

See attached seg-fault.txt output

Notes

**In TILApp/Sources/TILApp/Models/TILToken.swift, if you replace import TILCore with the following it compiles successfully:

final class TILToken: Codable {{{
}}{{ var id: UUID?}}
{{ var token: String}}
{{ var userID: UUID}}
{{ init(token: String, userID: UUID) {}}{{
self.token = token}}
{{ self.userID = userID}}{{
}}}
{{}}}

This is a package protected version of the code that lives in TILCore - making the code above public causes the same seg fault.

@belkadan
Copy link
Contributor

belkadan commented Apr 8, 2019

Requires installing OpenSSL to test.

@belkadan
Copy link
Contributor

belkadan commented Apr 8, 2019

Crashing in deserialization, per conformance checking, without much useful information.

3  swift                    0x00000001078009a6 swift::ModuleFile::getDeclCheckedImpl(llvm::PointerEmbeddedInt<unsigned int, 31>) + 17430
anceChecker::recordTypeWitness(swift::AssociatedTypeDecl*, swift::Type, swift::TypeDecl*)::$_7, std::__1::allocator<swift::ConformanceChecker::recordTypeWitness(swift::AssociatedTypeDecl*, swift::Type, swift::TypeDecl*)::$_7>, void (swift::NormalProtocolConformance*)>::operator()(swift::NormalProtocolConformance*&&) + 38
5  swift                    0x00000001077a1463 std::__1::__function::__func<swift::ConformanceChecker::diagnoseOrDefer(swift::ValueDecl*, bool, std::__1::function<void (swift::NormalProtocolConformance*)>)::$_30, std::__1::allocator<swift::ConformanceChecker::diagnoseOrDefer(swift::ValueDecl*, bool, std::__1::function<void (swift::NormalProtocolConformance*)>)::$_30>, void ()>::operator()() + 35
6  swift                    0x000000010779dd18 swift::ConformanceChecker::diagnoseOrDefer(swift::ValueDecl*, bool, std::__1::function<void (swift::NormalProtocolConformance*)>) + 200
7  swift                    0x00000001077a181f swift::ConformanceChecker::emitDelayedDiags() + 303
8  swift                    0x000000010779cd25 swift::MultiConformanceChecker::checkIndividualConformance(swift::NormalProtocolConformance*, bool) + 11461
9  swift                    0x0000000107799b73 swift::MultiConformanceChecker::checkAllConformances() + 147

@belkadan
Copy link
Contributor

belkadan commented Apr 8, 2019

If you happen to have the full crash log around (from Console.app), can you attach that too? It's got slightly different information than what gets dumped to the shell.

@0xTim
Copy link
Author

0xTim commented Apr 10, 2019

I've attached all the crash reports from the time I was seeing it

@slavapestov
Copy link
Member

This was fixed by #22800

@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
Projects
None yet
Development

No branches or pull requests

4 participants