-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.crashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwaretriage neededThis issue needs more specific labelsThis issue needs more specific labels
Description
Description
We're experiencing a compiler crash while building with 6.3; it happens only when -enable-library-evolution is used.
Reproduction
Base.swift:
open class PartitionedSequence<T> {
open class Partition {
open class Iterator {
public init() {}
open func next() -> T? { nil }
}
}
}Consumer.swift:
import Base
final class FilteredPartition<Base: Sequence>: PartitionedSequence<Base.Element>.Partition {}
extension FilteredPartition {
final class Iterator: PartitionedSequence<Base.Element>.Partition.Iterator {
var iterator: Base.Iterator
init(_ iterator: Base.Iterator) { self.iterator = iterator }
override func next() -> Base.Element? { iterator.next() }
}
}SWIFTC=${SWIFTC:-swiftc}
rm -rf out && mkdir out
$SWIFTC -c -enable-library-evolution -enable-testing -emit-module -emit-module-path out/Base.swiftmodule -module-name Base Base.swift -o out/Base.o
$SWIFTC -c -enable-library-evolution -enable-testing -I out -module-name Consumer Consumer.swift -o out/Consumer.oWith -enable-library-evolution, but if -enable-testing is removed there is no crash.
Stack dump
Assertion failed: (stored.isStatic() && "resilient class metadata layout unsupported!"), function getStaticFieldOffset, file MetadataLayout.cpp, line 508.
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0. Program arguments: /Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file Consumer.swift -target arm64-apple-macosx26.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -I out -color-diagnostics -Xcc -fcolor-diagnostics -enable-library-evolution -enable-testing -no-auto-bridging-header-chaining -module-name Consumer -in-process-plugin-server-path /Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/lib/swift/host/libSwiftInProcPluginServer.dylib -plugin-path /Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/lib/swift/host/plugins -plugin-path /Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/local/lib/swift/host/plugins -o out/Consumer.o
1. Apple Swift version 6.3-dev (LLVM 35f48306184cd25, Swift a69dbb3366e64d8)
2. Compiling with effective version 5.10
3. While evaluating request IRGenRequest(IR Generation for file "Consumer.swift")
#0 0x0000000107df1fd4 (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x105ccdfd4)
#1 0x0000000107df02f0 (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x105ccc2f0)
#2 0x0000000107df2a64 (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x105ccea64)
#3 0x000000018ccf3744 (/usr/lib/system/libsystem_platform.dylib+0x1804e3744)
#4 0x000000018cce9888 (/usr/lib/system/libsystem_pthread.dylib+0x1804d9888)
#5 0x000000018cbee850 (/usr/lib/system/libsystem_c.dylib+0x1803de850)
#6 0x000000018cbeda84 (/usr/lib/system/libsystem_c.dylib+0x1803dda84)
#7 0x0000000107e13e60 (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x105cefe60)
#8 0x0000000102992b4c (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x10086eb4c)
#9 0x0000000102847c20 (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x100723c20)
#10 0x0000000102847edc (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x100723edc)
#11 0x00000001027cd5d4 (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x1006a95d4)
#12 0x00000001028ddabc (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x1007b9abc)
#13 0x000000010292b8cc (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x1008078cc)
#14 0x0000000102180dd4 (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x10005cdd4)
#15 0x00000001028e03f4 (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x1007bc3f4)
#16 0x0000000102402998 (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x1002de998)
#17 0x00000001023fcfe4 (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x1002d8fe4)
#18 0x00000001023fc2d4 (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x1002d82d4)
#19 0x000000010240d068 (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x1002e9068)
#20 0x0000000102400350 (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x1002dc350)
#21 0x00000001023fdaac (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x1002d9aac)
#22 0x000000010215d8a4 (/Users/sarunas/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a.xctoolchain/usr/bin/swift-frontend+0x1000398a4)
Expected behavior
Compiles and works fine on Swift 6.2.
Environment
swift-DEVELOPMENT-SNAPSHOT-2025-12-01
Apple Swift version 6.3-dev (LLVM 35f48306184cd25, Swift a69dbb3366e64d8)
Target: arm64-apple-macosx26.0
Build config: +assertions
Additional information
No response
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.crashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwaretriage neededThis issue needs more specific labelsThis issue needs more specific labels