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-15464] Compiler crash with "abort trap: 6" #57769

Closed
WowbaggersLiquidLunch opened this issue Nov 9, 2021 · 2 comments
Closed

[SR-15464] Compiler crash with "abort trap: 6" #57769

WowbaggersLiquidLunch opened this issue Nov 9, 2021 · 2 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@WowbaggersLiquidLunch
Copy link
Collaborator

Previous ID SR-15464
Radar None
Original Reporter @WowbaggersLiquidLunch
Type Bug
Status Closed
Resolution Done

Attachment: Download

Environment

macOS 12.1 Beta (21C5021h)
Swift 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6)
2021-10-27 development snapshot
2021-10-12 development snapshot
Xcode 13.1 (13A1030d)

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

md5: 1c9d84421d8f07a77904cc554b294fb6

is blocked by:

  • SR-15507 Compiler crashes with "SIL verification failed: external declaration of internal SILFunction not allowed: F->isAvailableExternally()"

Issue Description:

Compiler crashes when building the SwiftKMeans target of the attached Swift package.

Build log from Xcode 13.1 toolchain: https://gist.github.com/WowbaggersLiquidLunch/6046d9783d25d83e72a31ebc7c4f1390

When building using 2021-10-27 development snapshot toolchain on Xcode, the build log produces the same error for swift-algorithm’s Intersperse.swift, Joined.swift, FlattenCollection.swift, and Indexed.swift.

Update: I reduced it to a much smaller code that reproduces the bug:

import Algorithms

public struct Foo {
    public private(set) var foos: [Int]
}

extension Foo {
    func chunkedFoos() -> [[Int]] {
        foos.chunks(ofCount: 100)
            .map { foosChunk in
                foosChunk.map { $0 }
            }
    }
}

This smaller code is also attached in the form of a Swift package "Chunking".

A copy of diagnostic messages can be found here: https://gist.github.com/WowbaggersLiquidLunch/b677ce40b3f89c5f381fb966ee0b6e5e

@WowbaggersLiquidLunch
Copy link
Collaborator Author

This might be related to (or a duplicate of) SR-15254. The compiler crashes in swift-algorithms for both, and the diagnostics messages look similar. I'm not able to tell if turning off the requirement machine helps, because -Xfrontend -requirement-machine=off doesn't seem to work.

cc @slavapestov

@WowbaggersLiquidLunch
Copy link
Collaborator Author

I verified that this is fixed in 2020-02-25 trunk toolchain.

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

No branches or pull requests

1 participant