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-12704] Crash when dumping the AST of a typealias in a #if condition #55148

Closed
swift-ci opened this issue Apr 29, 2020 · 5 comments
Closed
Assignees
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

@swift-ci
Copy link
Collaborator

Previous ID SR-12704
Radar rdar://problem/62894031
Original Reporter vinivendra (JIRA User)
Type Bug
Status Closed
Resolution Done

Attachment: Download

Environment

macOS 10.15.4, Swift 5.2.

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

md5: 9f466a30ef09bbdc3e794ee3586789fc

Issue Description:

If we create a file containing:

#if !MY_FLAG

typealias MyString = String

#endif

Then try to dump its AST with:

xcrun swiftc test.swift -dump-ast -D MY_FLAG

The compiler crashes. The error message (and stack dump etc) are in the attached file.

@theblixguy
Copy link
Collaborator

cc davidungar (JIRA User)

@beccadax
Copy link
Contributor

beccadax commented May 5, 2020

@swift-ci create

@typesanitizer
Copy link

Seems to work ok on master @ ad00350, can you try reproducing with a toolchain from a recent development snapshot? https://swift.org/download/#snapshots

@swift-ci
Copy link
Collaborator Author

swift-ci commented May 9, 2020

Comment by Vinicius Vendramini (JIRA)

Yeah, it seems to be working fine on the development snapshot.

@typesanitizer
Copy link

Marking as Resolved since this has been fixed on master.

@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

5 participants