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-14499] Compiler crash #56854

Closed
swift-ci opened this issue Apr 16, 2021 · 4 comments
Closed

[SR-14499] Compiler crash #56854

swift-ci opened this issue Apr 16, 2021 · 4 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself type checker Area → compiler: Semantic analysis

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-14499
Radar None
Original Reporter Alexis.S (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

macOS 11.2.3

Apple Swift version 5.4 (swiftlang-1205.0.26.4 clang-1205.0.19.54)

Reproducible with switftc, and in Xcode project or playground

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

md5: 39d3331bfd0bb3e40979cc133002d640

Issue Description:

The compiler crashes (abort trap 6) when uncommenting one of the crash block of comments and commenting the pass one.

struct A { }
struct B { }
 
func reproduce() -> [(A, B)] {
[
// Pass 
//(true, A.init(), B.init()),

// Crash
//(true, .init(), B.init()),

// Crash
//(true, A.init(), .init()),

// Crash
//(true, .init(), .init()),
]
.filter(\.0)
.prefix(3)
.map { ($0.1, $0.2) }
}
@LucianoPAlmeida
Copy link
Collaborator

Couldn't reproduce this on a near main build, can you please verify on the current main snapshot from https://swift.org/download/ ?

cc @xedin

@swift-ci
Copy link
Collaborator Author

Comment by Alexis Schultz (JIRA)

I can't download a full toolchain rn but I reproduce the issue with the newly released Xcode 12.5 rc

@LucianoPAlmeida
Copy link
Collaborator

By the crash logs, looks like the issue may be resolved by #36427 (@xedin can confirm it) so it would indeed not be available on 12.5

@LucianoPAlmeida
Copy link
Collaborator

Already fixed on main and regression tests added =]

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 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 type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

2 participants