Compiling the test case below results in the compiler hanging. The test case was reduced from code that reads from a DEFLATE bitstream.
Sampling suggests that this hang happens in MovedAsyncVarDebugInfoPropagatorTransform::run().
Reproduction
struct BitReader: ~Copyable {
var currentByte: UInt8
var nextBit: Void
mutating func next(
_ bitCount: Int
) async {
while true {
if nextBit == () {
currentByte = 0
} else {}
_ = 1 << bitCount
}
}
}
Expected behavior
The compiler does not hang.
Environment
swift-driver version: 1.112.3 Apple Swift version 6.0 (swiftlang-6.0.0.6.8 clang-1600.0.23.1)
Target: arm64-apple-macosx14.0
Using Xcode 16 beta 4
Additional information
Activity Monitor shows that swift-frontend uses almost 100% CPU while hanging. Sampling the process (ⓘ in Activity Monitor's toolbar > Sample) shows that MovedAsyncVarDebugInfoPropagatorTransform::run() is close to the top of the call stack.
Description
Compiling the test case below results in the compiler hanging. The test case was reduced from code that reads from a DEFLATE bitstream.
Sampling suggests that this hang happens in
MovedAsyncVarDebugInfoPropagatorTransform::run()
.Reproduction
Expected behavior
The compiler does not hang.
Environment
swift-driver version: 1.112.3 Apple Swift version 6.0 (swiftlang-6.0.0.6.8 clang-1600.0.23.1) Target: arm64-apple-macosx14.0
Using Xcode 16 beta 4
Additional information
Activity Monitor shows that swift-frontend uses almost 100% CPU while hanging. Sampling the process (ⓘ in Activity Monitor's toolbar > Sample) shows that
MovedAsyncVarDebugInfoPropagatorTransform::run()
is close to the top of the call stack.