8000 SIL verification failed: function_ref inside fragile function cannot reference a private or hidden symbol · Issue #82589 · swiftlang/swift · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
SIL verification failed: function_ref inside fragile function cannot reference a private or hidden symbol #82589
Open
@Steelskin

Description

@Steelskin

Description

Using a recent local Swift toolchain build to build the swift-crypto project on Windows with this PR fixing the Windows build, I hit a compiler crash. The code triggering the crash is this one, particularly, the second precondition referencing self.allocatedCapacity:

    // Copies some bytes into the buffer at the appropriate place. Does not update count: external code must do so.
    @inlinable
    /* private but inlinable */ func _copyBytes<C: Collection>(_ bytes: C, at offset: Int) where C.Element == UInt8 {
        precondition(offset >= 0)
        precondition(offset + bytes.count <= self.allocatedCapacity)

        let byteRange = offset..<(offset + bytes.count)

        self._withVeryUnsafeMutableBytes { backingPtr in
            let dest = UnsafeMutableRawBufferPointer(rebasing: backingPtr[byteRange])
            dest.copyBytes(from: bytes)
        }
    }

Command line + compiler output:
swift-crypto-sil-verification-failure.txt

Reproduction

Build swift-crypto on Windows with apple/swift-crypto#370 applied.

Stack dump

Unsymbolized.

Expected behavior

Toolchain does not crash.

Environment

Swift version 6.2-dev (LLVM ab6128e8887fcf8, Swift c6b7b1f)
Target: x86_64-unknown-windows-msvc
Build config: +assertions

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.crashBug: A crash, i.e., an abnormal termination of softwaretriage neededThis issue needs more specific labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0