[SR-10941] Stack overflow from swift_getAssociatedConformanceWitness infinite recursion #53332
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
crash
Bug: A crash, i.e., an abnormal termination of software
run-time crash
Bug → crash: Swift code crashed during execution
Attachment: Download
Environment
Xcode 10.2.1
Swift 5.0.1
macOS 10.14.5
Additional Detail from JIRA
md5: ef7e675cf10cb3ea988af2eef3d02ec8
Issue Description:
While working on some heavy generics/associated type constraints, I got to a state where I have a code that can be compiled successfully, but crashes in runtime.
From what I can gather, it seems to be an infinite recursion leading to a stack overflow.
This is the stack trace in question:
I also compiled a Swift file that reproduces the problem:
After reducing the reproducer to the form you see above, I found that when I change the protocol TypedSupportedTypeFactory from:
to:
then it still compiles successfully and doesn't crash in runtime anymore.
Also, before the change, Swift compiler was producing a warning that the TypedSupportedType's conformance to SupportedPropertyType is redundant.
The text was updated successfully, but these errors were encountered: