Skip to content

SwiftGen causes compiler crash running Swift 5.2 from command line #686

@samrayner

Description

@samrayner

Steps to reproduce:

  1. brew uninstall swiftgen
  2. Install Xcode 11.4, ensure selected with xcode-select
  3. In command line: echo "import Foundation; print(Date())" | swift - (prints date)
  4. brew install swiftgen
  5. In command line: echo "import Foundation; print(Date())" | swift - (CRASHES)

Note: This crash did not occur with Swift 5.1 or earlier. It does not occur with the Swift REPL, only piping from stdin or executing a file with the swift command.

I initially assumed this was a Swift bug and filed a radar but Apple traced it to SwiftGen when they noticed that the Swift process was loading /usr/local/Cellar/swiftgen/6.1.0/lib/libswiftFoundation.dylib

Thanks!

Resolved: rdar://problem/59976668
Resolved: https://bugs.swift.org/browse/SR-12306

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions