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

#expect crashes w/ EXC_BAD_ACCESS on collections of length greater than 2 where children refer to parent #79182

Open
dleavitt opened this issue Feb 6, 2025 · 0 comments
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 triage needed This issue needs more specific labels

Comments

@dleavitt
Copy link

dleavitt commented Feb 6, 2025

Description

I have a class Coll with a property items that's an array of Items.

These Items can have a weak reference back to their Coll. If at least three of them do, a failed expectation about the Coll or one of the Items will cause a crash with EXC_BAD_ACCESS.

I believe the crash is caused when generating the description of the expectation e.g. Expectation failed: (subject → SwiftExpectReproTests.Coll) == nil

Looks like infinite recursion?

Reproduction

import Testing

// minimal reproduction
@Test func testSimplestRepro() {
    let collection = Coll([Item("a"), Item("b"), Item("c")])
    for item in collection.items { item.collection = collection }
    #expect(collection == nil) // EXC_BAD_ACCESS
}

// what crashes, what doesn't
@Test func testFailureScenarios() {
    let subject = Coll([Item("a"), Item("b"), Item("c")])

    let sameLength = Coll([Item("c"), Item("a"), Item("b")])

    #expect(subject == sameLength) // expectation fails but doesn't crash
    #expect(subject == nil) // expectation fails but doesn't crash

    // two items is fine
    subject.items[0].collection = subject
    subject.items[1].collection = subject
    #expect(subject == sameLength) // expectation fails but doesn't crash
    // but once we add a third item...
    subject.items[2].collection = subject

    let equal = Coll([Item("a"), Item("b"), Item("c")])
    #expect(subject == equal) // works fine, doesn't need to print expectation

    #expect(subject == sameLength, "Nope") // crashes with EXC_BAD_ACCESS. Message doesn't help.
    #expect(subject.items == sameLength.items) // crashes
    #expect(subject == nil) // crashes
    #expect(subject.items[0] == nil) // crashes

    let diffLength = Coll([Item("a"), Item("b"), Item("c"), Item("d")])
    #expect(subject == diffLength) // crashes
}

class Coll: Equatable { // equatable isn't actually needed to repro
    var items: [Item]
    init(_ items: [Item] = []) { self.items = items }
    static func == (lhs: Coll, rhs: Coll) -> Bool {
        guard lhs.items.count == rhs.items.count else { return false }
        return lhs.items == rhs.items
    }
}

class Item: Equatable {
    var id: String
    weak var collection: Coll? // weak vs strong doesn't make a difference
    init(_ id: String) { self.id = id }
    static func == (lhs: Item, rhs: Item) -> Bool { lhs.id == rhs.id }
}

Stack dump

* thread #2, queue = 'com.apple.root.user-initiated-qos.cooperative', stop reason = EXC_BAD_ACCESS (code=2, address=0x16fe03c50)
    frame #0: 0x00000001a6b7bec8 libswiftCore.dylib`swift_getTypeByMangledNameImpl(swift::MetadataRequest, __swift::__runtime::llvm::StringRef, void const* const*, std::__1::function<void const* (unsigned int, unsigned int)>, std::__1::function<swift::TargetWitnessTable<swift::InProcess> const* (swift::TargetMetadata<swift::InProcess> const*, unsigned int)>) + 72
    frame #1: 0x00000001a6b75d70 libswiftCore.dylib`swift_getTypeByMangledName + 836
    frame #2: 0x00000001a6b91028 libswiftCore.dylib`swift::_checkGenericRequirements(__swift::__runtime::llvm::ArrayRef<swift::GenericParamDescriptor>, __swift::__runtime::llvm::ArrayRef<swift::TargetGenericRequirementDescriptor<swift::InProcess>>, __swift::__runtime::llvm::SmallVectorImpl<void const*>&, std::__1::function<void const* (unsigned int, unsigned int)>, std::__1::function<void const* (unsigned int, unsigned int)>, std::__1::function<swift::TargetWitnessTable<swift::InProcess> const* (swift::TargetMetadata<swift::InProcess> const*, unsigned int)>) + 1100
    frame #3: 0x00000001a6b79410 libswiftCore.dylib`_gatherGenericParameters(swift::TargetContextDescriptor<swift::InProcess> const*, __swift::__runtime::llvm::ArrayRef<swift::MetadataOrPack>, swift::TargetMetadata<swift::InProcess> const*, __swift::__runtime::llvm::SmallVectorImpl<unsigned int>&, __swift::__runtime::llvm::SmallVectorImpl<void const*>&, swift::Demangle::__runtime::Demangler&) + 2004
    frame #4: 0x00000001a6b846d8 libswiftCore.dylib`(anonymous namespace)::DecodedMetadataBuilder::createBoundGenericType(swift::TargetContextDescriptor<swift::InProcess> const*, __swift::__runtime::llvm::ArrayRef<swift::MetadataOrPack>, swift::MetadataOrPack) const + 248
    frame #5: 0x00000001a6b80fb4 libswiftCore.dylib`swift::Demangle::__runtime::TypeDecoder<(anonymous namespace)::DecodedMetadataBuilder>::decodeMangledType(swift::Demangle::__runtime::Node*, unsigned int, bool) + 9904
    frame #6: 0x00000001a6b80bf4 libswiftCore.dylib`swift::Demangle::__runtime::TypeDecoder<(anonymous namespace)::DecodedMetadataBuilder>::decodeMangledType(swift::Demangle::__runtime::Node*, unsigned int, bool) + 8944
    frame #7: 0x00000001a6b7bcc0 libswiftCore.dylib`swift_getTypeByMangledNodeImpl(swift::MetadataRequest, swift::Demangle::__runtime::Demangler&, swift::Demangle::__runtime::Node*, void const* const*, std::__1::function<void const* (unsigned int, unsigned int)>, std::__1::function<swift::TargetWitnessTable<swift::InProcess> const* (swift::TargetMetadata<swift::InProcess> const*, unsigned int)>) + 892
    frame #8: 0x00000001a6b7b864 libswiftCore.dylib`swift_getTypeByMangledNode + 836
    frame #9: 0x00000001a6b7c32c libswiftCore.dylib`swift_getTypeByMangledNameImpl(swift::MetadataRequest, __swift::__runtime::llvm::StringRef, void const* const*, std::__1::function<void const* (unsigned int, unsigned int)>, std::__1::function<swift::TargetWitnessTable<swift::InProcess> const* (swift::TargetMetadata<swift::InProcess> const*, unsigned int)>) + 1196
    frame #10: 0x00000001a6b75d70 libswiftCore.dylib`swift_getTypeByMangledName + 836
    frame #11: 0x00000001a6b9be28 libswiftCore.dylib`(anonymous namespace)::getFieldAt(swift::TargetMetadata<swift::InProcess> const*, unsigned int) + 556
    frame #12: 0x00000001a6b9d6b4 libswiftCore.dylib`decltype(fp2(nullptr)) (anonymous namespace)::call<swift_reflectionMirror_subscript::$_0>(swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*, swift_reflectionMirror_subscript::$_0 const&)::'lambda'()::operator()() const + 352
    frame #13: 0x00000001a6b9a664 libswiftCore.dylib`swift_reflectionMirror_subscript + 456
    frame #14: 0x00000001a6b18984 libswiftCore.dylib`partial apply forwarder for closure #1 (Swift.Int) -> (label: Swift.Optional<Swift.String>, value: Any) in Swift.Mirror.init(internalReflecting: Any, subjectType: Swift.Optional<Any.Type>, customAncestor: Swift.Optional<Swift.Mirror>) -> Swift.Mirror + 72
    frame #15: 0x00000001a68f5ffc libswiftCore.dylib`Swift.LazyMapSequence< where τ_0_0: Swift.Collection>.subscript.read : (τ_0_0.Index) -> τ_0_1 + 388
    frame #16: 0x00000001a68f5e48 libswiftCore.dylib`protocol witness for Swift.Collection.subscript.read : (τ_0_0.Index) -> τ_0_0.Element in conformance < where τ_0_0: Swift.Collection> Swift.LazyMapSequence<τ_0_0, τ_0_1> : Swift.Collection in Swift + 72
    frame #17: 0x00000001a677cf44 libswiftCore.dylib`merged generic partial specialization <Signature = @escaping @convention(thin) @convention(method) <τ_0_0><τ_1_0, τ_1_1 where τ_0_0: Swift.Collection, τ_1_1 == Swift.Error> (@guaranteed @callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2 where τ_0_0: ~Swift.Copyable, τ_0_0: ~Swift.Escapable, τ_0_1: ~Swift.Copyable, τ_0_1: ~Swift.Escapable, τ_0_2: ~Swift.Copyable, τ_0_2: ~Swift.Escapable> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error @out τ_0_1) for <τ_0_0.ElementSwift.Errorτ_1_0>, @in_guaranteed τ_0_0) -> (@owned Swift.Array<τ_1_0>, @error @owned Swift.Error)> of Swift.Collection.map<τ_0_0, τ_0_1 where τ_1_1: Swift.Error>((τ_0_0.Element) throws(τ_1_1) -> τ_1_0) throws(τ_1_1) -> Swift.Array<τ_1_0> + 656
    frame #18: 0x00000001a6866658 libswiftCore.dylib`Swift._RandomAccessCollectionBox._map<τ_0_0>((τ_0_0.Element) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 316
    frame #19: 0x00000001a6af7410 libswiftCore.dylib`dispatch thunk of Swift._AnySequenceBox._map<τ_0_0>((τ_0_0) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 48
    frame #20: 0x000000010300ff18 Testing`Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 2324
    frame #21: 0x0000000103010214 Testing`closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 132
    frame #22: 0x0000000103017e78 Testing`partial apply forwarder for closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 24
    frame #23: 0x0000000103017e9c Testing`partial apply forwarder for generic specialization <(label: Swift.Optional<Swift.String>, value: Any), Testing.__Expression.Value, Swift.Never> of reabstraction thunk helper <τ_0_0><τ_1_0, τ_1_1 where τ_1_1: Swift.Error> from @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @out τ_1_1) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @owned Swift.Error) + 28
    frame #24: 0x00000001a6adead8 libswiftCore.dylib`merged partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Collection> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 32
    frame #25: 0x00000001a6ad870c libswiftCore.dylib`partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Sequence> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 16
    frame #26: 0x00000001a677cf94 libswiftCore.dylib`merged generic partial specialization <Signature = @escaping @convention(thin) @convention(method) <τ_0_0><τ_1_0, τ_1_1 where τ_0_0: Swift.Collection, τ_1_1 == Swift.Error> (@guaranteed @callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2 where τ_0_0: ~Swift.Copyable, τ_0_0: ~Swift.Escapable, τ_0_1: ~Swift.Copyable, τ_0_1: ~Swift.Escapable, τ_0_2: ~Swift.Copyable, τ_0_2: ~Swift.Escapable> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error @out τ_0_1) for <τ_0_0.ElementSwift.Errorτ_1_0>, @in_guaranteed τ_0_0) -> (@owned Swift.Array<τ_1_0>, @error @owned Swift.Error)> of Swift.Collection.map<τ_0_0, τ_0_1 where τ_1_1: Swift.Error>((τ_0_0.Element) throws(τ_1_1) -> τ_1_0) throws(τ_1_1) -> Swift.Array<τ_1_0> + 736
    frame #27: 0x00000001a685ecd8 libswiftCore.dylib`Swift._CollectionBox._map<τ_0_0>((τ_0_0.Element) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 308
    frame #28: 0x00000001a6af7410 libswiftCore.dylib`dispatch thunk of Swift._AnySequenceBox._map<τ_0_0>((τ_0_0) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 48
    frame #29: 0x000000010300ff18 Testing`Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 2324
    frame #30: 0x0000000103010214 Testing`closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 132
    frame #31: 0x0000000103017e78 Testing`partial apply forwarder for closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 24
    frame #32: 0x0000000103017e9c Testing`partial apply forwarder for generic specialization <(label: Swift.Optional<Swift.String>, value: Any), Testing.__Expression.Value, Swift.Never> of reabstraction thunk helper <τ_0_0><τ_1_0, τ_1_1 where τ_1_1: Swift.Error> from @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @out τ_1_1) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @owned Swift.Error) + 28
    frame #33: 0x00000001a6adead8 libswiftCore.dylib`merged partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Collection> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 32
    frame #34: 0x00000001a6ad870c libswiftCore.dylib`partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Sequence> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 16
    frame #35: 0x00000001a677cf94 libswiftCore.dylib`merged generic partial specialization <Signature = @escaping @convention(thin) @convention(method) <τ_0_0><τ_1_0, τ_1_1 where τ_0_0: Swift.Collection, τ_1_1 == Swift.Error> (@guaranteed @callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2 where τ_0_0: ~Swift.Copyable, τ_0_0: ~Swift.Escapable, τ_0_1: ~Swift.Copyable, τ_0_1: ~Swift.Escapable, τ_0_2: ~Swift.Copyable, τ_0_2: ~Swift.Escapable> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error @out τ_0_1) for <τ_0_0.ElementSwift.Errorτ_1_0>, @in_guaranteed τ_0_0) -> (@owned Swift.Array<τ_1_0>, @error @owned Swift.Error)> of Swift.Collection.map<τ_0_0, τ_0_1 where τ_1_1: Swift.Error>((τ_0_0.Element) throws(τ_1_1) -> τ_1_0) throws(τ_1_1) -> Swift.Array<τ_1_0> + 736
    frame #36: 0x00000001a6866658 libswiftCore.dylib`Swift._RandomAccessCollectionBox._map<τ_0_0>((τ_0_0.Element) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 316
    frame #37: 0x00000001a6af7410 libswiftCore.dylib`dispatch thunk of Swift._AnySequenceBox._map<τ_0_0>((τ_0_0) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 48
    frame #38: 0x000000010300ff18 Testing`Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 2324
    frame #39: 0x0000000103010214 Testing`closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 132
    frame #40: 0x0000000103017e78 Testing`partial apply forwarder for closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 24
    frame #41: 0x0000000103017e9c Testing`partial apply forwarder for generic specialization <(label: Swift.Optional<Swift.String>, value: Any), Testing.__Expression.Value, Swift.Never> of reabstraction thunk helper <τ_0_0><τ_1_0, τ_1_1 where τ_1_1: Swift.Error> from @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @out τ_1_1) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @owned Swift.Error) + 28
    frame #42: 0x00000001a6adead8 libswiftCore.dylib`merged partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Collection> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 32
    frame #43: 0x00000001a6ad870c libswiftCore.dylib`partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Sequence> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 16
    frame #44: 0x00000001a677cf94 libswiftCore.dylib`merged generic partial specialization <Signature = @escaping @convention(thin) @convention(method) <τ_0_0><τ_1_0, τ_1_1 where τ_0_0: Swift.Collection, τ_1_1 == Swift.Error> (@guaranteed @callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2 where τ_0_0: ~Swift.Copyable, τ_0_0: ~Swift.Escapable, τ_0_1: ~Swift.Copyable, τ_0_1: ~Swift.Escapable, τ_0_2: ~Swift.Copyable, τ_0_2: ~Swift.Escapable> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error @out τ_0_1) for <τ_0_0.ElementSwift.Errorτ_1_0>, @in_guaranteed τ_0_0) -> (@owned Swift.Array<τ_1_0>, @error @owned Swift.Error)> of Swift.Collection.map<τ_0_0, τ_0_1 where τ_1_1: Swift.Error>((τ_0_0.Element) throws(τ_1_1) -> τ_1_0) throws(τ_1_1) -> Swift.Array<τ_1_0> + 736
    frame #45: 0x00000001a6866658 libswiftCore.dylib`Swift._RandomAccessCollectionBox._map<τ_0_0>((τ_0_0.Element) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 316
    frame #46: 0x00000001a6af7410 libswiftCore.dylib`dispatch thunk of Swift._AnySequenceBox._map<τ_0_0>((τ_0_0) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 48
    frame #47: 0x000000010300ff18 Testing`Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 2324
    frame #48: 0x0000000103010214 Testing`closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 132
    frame #49: 0x0000000103017e78 Testing`partial apply forwarder for closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 24
    frame #50: 0x0000000103017e9c Testing`partial apply forwarder for generic specialization <(label: Swift.Optional<Swift.String>, value: Any), Testing.__Expression.Value, Swift.Never> of reabstraction thunk helper <τ_0_0><τ_1_0, τ_1_1 where τ_1_1: Swift.Error> from @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @out τ_1_1) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @owned Swift.Error) + 28
    frame #51: 0x00000001a6adead8 libswiftCore.dylib`merged partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Collection> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 32
    frame #52: 0x00000001a6ad870c libswiftCore.dylib`partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Sequence> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 16
    frame #53: 0x00000001a677cf94 libswiftCore.dylib`merged generic partial specialization <Signature = @escaping @convention(thin) @convention(method) <τ_0_0><τ_1_0, τ_1_1 where τ_0_0: Swift.Collection, τ_1_1 == Swift.Error> (@guaranteed @callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2 where τ_0_0: ~Swift.Copyable, τ_0_0: ~Swift.Escapable, τ_0_1: ~Swift.Copyable, τ_0_1: ~Swift.Escapable, τ_0_2: ~Swift.Copyable, τ_0_2: ~Swift.Escapable> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error @out τ_0_1) for <τ_0_0.ElementSwift.Errorτ_1_0>, @in_guaranteed τ_0_0) -> (@owned Swift.Array<τ_1_0>, @error @owned Swift.Error)> of Swift.Collection.map<τ_0_0, τ_0_1 where τ_1_1: Swift.Error>((τ_0_0.Element) throws(τ_1_1) -> τ_1_0) throws(τ_1_1) -> Swift.Array<τ_1_0> + 736
    frame #54: 0x00000001a6866658 libswiftCore.dylib`Swift._RandomAccessCollectionBox._map<τ_0_0>((τ_0_0.Element) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 316
    frame #55: 0x00000001a6af7410 libswiftCore.dylib`dispatch thunk of Swift._AnySequenceBox._map<τ_0_0>((τ_0_0) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 48
    frame #56: 0x000000010300ff18 Testing`Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 2324
    frame #57: 0x0000000103010214 Testing`closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 132
    frame #58: 0x0000000103017e78 Testing`partial apply forwarder for closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 24
    frame #59: 0x0000000103017e9c Testing`partial apply forwarder for generic specialization <(label: Swift.Optional<Swift.String>, value: Any), Testing.__Expression.Value, Swift.Never> of reabstraction thunk helper <τ_0_0><τ_1_0, τ_1_1 where τ_1_1: Swift.Error> from @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @out τ_1_1) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @owned Swift.Error) + 28
    frame #60: 0x00000001a6adead8 libswiftCore.dylib`merged partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Collection> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 32
    frame #61: 0x00000001a6ad870c libswiftCore.dylib`partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Sequence> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 16
    frame #62: 0x00000001a677cf94 libswiftCore.dylib`merged generic partial specialization <Signature = @escaping @convention(thin) @convention(method) <τ_0_0><τ_1_0, τ_1_1 where τ_0_0: Swift.Collection, τ_1_1 == Swift.Error> (@guaranteed @callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2 where τ_0_0: ~Swift.Copyable, τ_0_0: ~Swift.Escapable, τ_0_1: ~Swift.Copyable, τ_0_1: ~Swift.Escapable, τ_0_2: ~Swift.Copyable, τ_0_2: ~Swift.Escapable> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error @out τ_0_1) for <τ_0_0.ElementSwift.Errorτ_1_0>, @in_guaranteed τ_0_0) -> (@owned Swift.Array<τ_1_0>, @error @owned Swift.Error)> of Swift.Collection.map<τ_0_0, τ_0_1 where τ_1_1: Swift.Error>((τ_0_0.Element) throws(τ_1_1) -> τ_1_0) throws(τ_1_1) -> Swift.Array<τ_1_0> + 736
    frame #63: 0x00000001a685ecd8 libswiftCore.dylib`Swift._CollectionBox._map<τ_0_0>((τ_0_0.Element) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 308
    frame #64: 0x00000001a6af7410 libswiftCore.dylib`dispatch thunk of Swift._AnySequenceBox._map<τ_0_0>((τ_0_0) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 48
    frame #65: 0x000000010300ff18 Testing`Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 2324
    frame #66: 0x0000000103010214 Testing`closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 132
    frame #67: 0x0000000103017e78 Testing`partial apply forwarder for closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 24
    frame #68: 0x0000000103017e9c Testing`partial apply forwarder for generic specialization <(label: Swift.Optional<Swift.String>, value: Any), Testing.__Expression.Value, Swift.Never> of reabstraction thunk helper <τ_0_0><τ_1_0, τ_1_1 where τ_1_1: Swift.Error> from @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @out τ_1_1) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @owned Swift.Error) + 28
    frame #69: 0x00000001a6adead8 libswiftCore.dylib`merged partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Collection> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 32
    frame #70: 0x00000001a6ad870c libswiftCore.dylib`partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Sequence> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 16
    frame #71: 0x00000001a677cf94 libswiftCore.dylib`merged generic partial specialization <Signature = @escaping @convention(thin) @convention(method) <τ_0_0><τ_1_0, τ_1_1 where τ_0_0: Swift.Collection, τ_1_1 == Swift.Error> (@guaranteed @callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2 where τ_0_0: ~Swift.Copyable, τ_0_0: ~Swift.Escapable, τ_0_1: ~Swift.Copyable, τ_0_1: ~Swift.Escapable, τ_0_2: ~Swift.Copyable, τ_0_2: ~Swift.Escapable> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error @out τ_0_1) for <τ_0_0.ElementSwift.Errorτ_1_0>, @in_guaranteed τ_0_0) -> (@owned Swift.Array<τ_1_0>, @error @owned Swift.Error)> of Swift.Collection.map<τ_0_0, τ_0_1 where τ_1_1: Swift.Error>((τ_0_0.Element) throws(τ_1_1) -> τ_1_0) throws(τ_1_1) -> Swift.Array<τ_1_0> + 736
    frame #72: 0x00000001a6866658 libswiftCore.dylib`Swift._RandomAccessCollectionBox._map<τ_0_0>((τ_0_0.Element) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 316
    frame #73: 0x00000001a6af7410 libswiftCore.dylib`dispatch thunk of Swift._AnySequenceBox._map<τ_0_0>((τ_0_0) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 48
    frame #74: 0x000000010300ff18 Testing`Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 2324
    frame #75: 0x0000000103010214 Testing`closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 132
    frame #76: 0x0000000103017e78 Testing`partial apply forwarder for closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 24
    frame #77: 0x0000000103017e9c Testing`partial apply forwarder for generic specialization <(label: Swift.Optional<Swift.String>, value: Any), Testing.__Expression.Value, Swift.Never> of reabstraction thunk helper <τ_0_0><τ_1_0, τ_1_1 where τ_1_1: Swift.Error> from @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @out τ_1_1) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @owned Swift.Error) + 28
    frame #78: 0x00000001a6adead8 libswiftCore.dylib`merged partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Collection> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 32
    frame #79: 0x00000001a6ad870c libswiftCore.dylib`partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Sequence> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 16
    frame #80: 0x00000001a677cf94 libswiftCore.dylib`merged generic partial specialization <Signature = @escaping @convention(thin) @convention(method) <τ_0_0><τ_1_0, τ_1_1 where τ_0_0: Swift.Collection, τ_1_1 == Swift.Error> (@guaranteed @callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2 where τ_0_0: ~Swift.Copyable, τ_0_0: ~Swift.Escapable, τ_0_1: ~Swift.Copyable, τ_0_1: ~Swift.Escapable, τ_0_2: ~Swift.Copyable, τ_0_2: ~Swift.Escapable> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error @out τ_0_1) for <τ_0_0.ElementSwift.Errorτ_1_0>, @in_guaranteed τ_0_0) -> (@owned Swift.Array<τ_1_0>, @error @owned Swift.Error)> of Swift.Collection.map<τ_0_0, τ_0_1 where τ_1_1: Swift.Error>((τ_0_0.Element) throws(τ_1_1) -> τ_1_0) throws(τ_1_1) -> Swift.Array<τ_1_0> + 736
    frame #81: 0x00000001a6866658 libswiftCore.dylib`Swift._RandomAccessCollectionBox._map<τ_0_0>((τ_0_0.Element) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 316
    frame #82: 0x00000001a6af7410 libswiftCore.dylib`dispatch thunk of Swift._AnySequenceBox._map<τ_0_0>((τ_0_0) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 48
    frame #83: 0x000000010300ff18 Testing`Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 2324
    frame #84: 0x0000000103010214 Testing`closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 132
    frame #85: 0x0000000103017e78 Testing`partial apply forwarder for closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 24
    frame #86: 0x0000000103017e9c Testing`partial apply forwarder for generic specialization <(label: Swift.Optional<Swift.String>, value: Any), Testing.__Expression.Value, Swift.Never> of reabstraction thunk helper <τ_0_0><τ_1_0, τ_1_1 where τ_1_1: Swift.Error> from @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @out τ_1_1) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @owned Swift.Error) + 28
    frame #87: 0x00000001a6adead8 libswiftCore.dylib`merged partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Collection> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 32
    frame #88: 0x00000001a6ad870c libswiftCore.dylib`partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Sequence> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 16
    frame #89: 0x00000001a677cf94 libswiftCore.dylib`merged generic partial specialization <Signature = @escaping @convention(thin) @convention(method) <τ_0_0><τ_1_0, τ_1_1 where τ_0_0: Swift.Collection, τ_1_1 == Swift.Error> (@guaranteed @callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2 where τ_0_0: ~Swift.Copyable, τ_0_0: ~Swift.Escapable, τ_0_1: ~Swift.Copyable, τ_0_1: ~Swift.Escapable, τ_0_2: ~Swift.Copyable, τ_0_2: ~Swift.Escapable> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error @out τ_0_1) for <τ_0_0.ElementSwift.Errorτ_1_0>, @in_guaranteed τ_0_0) -> (@owned Swift.Array<τ_1_0>, @error @owned Swift.Error)> of Swift.Collection.map<τ_0_0, τ_0_1 where τ_1_1: Swift.Error>((τ_0_0.Element) throws(τ_1_1) -> τ_1_0) throws(τ_1_1) -> Swift.Array<τ_1_0> + 736
    frame #90: 0x00000001a6866658 libswiftCore.dylib`Swift._RandomAccessCollectionBox._map<τ_0_0>((τ_0_0.Element) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 316
    frame #91: 0x00000001a6af7410 libswiftCore.dylib`dispatch thunk of Swift._AnySequenceBox._map<τ_0_0>((τ_0_0) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 48
    frame #92: 0x000000010300ff18 Testing`Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 2324
    frame #93: 0x0000000103010214 Testing`closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 132
    frame #94: 0x0000000103017e78 Testing`partial apply forwarder for closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 24
    frame #95: 0x0000000103017e9c Testing`partial apply forwarder for generic specialization <(label: Swift.Optional<Swift.String>, value: Any), Testing.__Expression.Value, Swift.Never> of reabstraction thunk helper <τ_0_0><τ_1_0, τ_1_1 where τ_1_1: Swift.Error> from @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @out τ_1_1) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @owned Swift.Error) + 28
    frame #96: 0x00000001a6adead8 libswiftCore.dylib`merged partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Collection> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 32
    frame #97: 0x00000001a6ad870c libswiftCore.dylib`partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Sequence> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 16
    frame #98: 0x00000001a677cf94 libswiftCore.dylib`merged generic partial specialization <Signature = @escaping @convention(thin) @convention(method) <τ_0_0><τ_1_0, τ_1_1 where τ_0_0: Swift.Collection, τ_1_1 == Swift.Error> (@guaranteed @callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2 where τ_0_0: ~Swift.Copyable, τ_0_0: ~Swift.Escapable, τ_0_1: ~Swift.Copyable, τ_0_1: ~Swift.Escapable, τ_0_2: ~Swift.Copyable, τ_0_2: ~Swift.Escapable> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error @out τ_0_1) for <τ_0_0.ElementSwift.Errorτ_1_0>, @in_guaranteed τ_0_0) -> (@owned Swift.Array<τ_1_0>, @error @owned Swift.Error)> of Swift.Collection.map<τ_0_0, τ_0_1 where τ_1_1: Swift.Error>((τ_0_0.Element) throws(τ_1_1) -> τ_1_0) throws(τ_1_1) -> Swift.Array<τ_1_0> + 736
    frame #99: 0x00000001a685ecd8 libswiftCore.dylib`Swift._CollectionBox._map<τ_0_0>((τ_0_0.Element) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 308
    frame #100: 0x00000001a6af7410 libswiftCore.dylib`dispatch thunk of Swift._AnySequenceBox._map<τ_0_0>((τ_0_0) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 48


.....


    frame #3269: 0x000000010300ff18 Testing`Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 2324
    frame #3270: 0x0000000103010214 Testing`closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 132
    frame #3271: 0x0000000103017e78 Testing`partial apply forwarder for closure #1 ((label: Swift.Optional<Swift.String>, value: Any)) -> Testing.__Expression.Value in Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 24
    frame #3272: 0x0000000103017e9c Testing`partial apply forwarder for generic specialization <(label: Swift.Optional<Swift.String>, value: Any), Testing.__Expression.Value, Swift.Never> of reabstraction thunk helper <τ_0_0><τ_1_0, τ_1_1 where τ_1_1: Swift.Error> from @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @out τ_1_1) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0) -> (@out τ_1_0, @error @owned Swift.Error) + 28
    frame #3273: 0x00000001a6adead8 libswiftCore.dylib`merged partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Collection> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 32
    frame #3274: 0x00000001a6ad870c libswiftCore.dylib`partial apply forwarder for reabstraction thunk helper <τ_0_0><τ_1_0 where τ_0_0: Swift.Sequence> from @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed τ_0_0.Swift.Sequence.Element) -> (@out τ_1_0, @error @out Swift.Error) + 16
    frame #3275: 0x00000001a677cf94 libswiftCore.dylib`merged generic partial specialization <Signature = @escaping @convention(thin) @convention(method) <τ_0_0><τ_1_0, τ_1_1 where τ_0_0: Swift.Collection, τ_1_1 == Swift.Error> (@guaranteed @callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2 where τ_0_0: ~Swift.Copyable, τ_0_0: ~Swift.Escapable, τ_0_1: ~Swift.Copyable, τ_0_1: ~Swift.Escapable, τ_0_2: ~Swift.Copyable, τ_0_2: ~Swift.Escapable> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error @out τ_0_1) for <τ_0_0.ElementSwift.Errorτ_1_0>, @in_guaranteed τ_0_0) -> (@owned Swift.Array<τ_1_0>, @error @owned Swift.Error)> of Swift.Collection.map<τ_0_0, τ_0_1 where τ_1_1: Swift.Error>((τ_0_0.Element) throws(τ_1_1) -> τ_1_0) throws(τ_1_1) -> Swift.Array<τ_1_0> + 736
    frame #3276: 0x00000001a6866658 libswiftCore.dylib`Swift._RandomAccessCollectionBox._map<τ_0_0>((τ_0_0.Element) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 316
    frame #3277: 0x00000001a6af7410 libswiftCore.dylib`dispatch thunk of Swift._AnySequenceBox._map<τ_0_0>((τ_0_0) throws -> τ_1_0) throws -> Swift.Array<τ_1_0> + 48
    frame #3278: 0x000000010300ff18 Testing`Testing.__Expression.Value.init(_reflecting: Any, label: Swift.Optional<Swift.String>, seenObjects: inout Swift.Dictionary<Swift.ObjectIdentifier, Swift.AnyObject>) -> Testing.__Expression.Value + 2324
    frame #3279: 0x0000000103010564 Testing`closure #1 (τ_0_0) -> Testing.__Expression.Value in Testing.__Expression.capturingRuntimeValue<τ_0_0>(Swift.Optional<τ_0_0>) -> Testing.__Expression + 152
    frame #3280: 0x0000000103017d90 Testing`partial apply forwarder for closure #1 (τ_0_0) -> Testing.__Expression.Value in Testing.__Expression.capturingRuntimeValue<τ_0_0>(Swift.Optional<τ_0_0>) -> Testing.__Expression + 24
    frame #3281: 0x000000010300c360 Testing`Swift.Optional.map<τ_0_0, τ_0_1 where τ_1_0: Swift.Error, τ_1_1: ~Swift.Copyable>((τ_0_0) throws(τ_1_0) -> τ_1_1) throws(τ_1_0) -> Swift.Optional<τ_1_1> + 516
    frame #3282: 0x000000010300d2cc Testing`Testing.__Expression.capturingRuntimeValue<τ_0_0>(Swift.Optional<τ_0_0>) -> Testing.__Expression + 456
    frame #3283: 0x000000010300da3c Testing`Testing.__Expression.capturingRuntimeValues<each τ_0_0, τ_0_1>(Swift.Optional<τ_0_1>, repeat Swift.Optional<τ_0_0>) -> Testing.__Expression + 1068
    frame #3284: 0x000000010300dbcc Testing`Testing.__Expression.capturingRuntimeValues<each τ_0_0, τ_0_1>(Swift.Optional<τ_0_1>, repeat Swift.Optional<τ_0_0>) -> Testing.__Expression + 1468
    frame #3285: 0x0000000102f9ca84 Testing`implicit closure #1 () -> Swift.Optional<Testing.__Expression> in Testing.__checkBinaryOperation<τ_0_0, τ_0_1>(_: τ_0_0, _: (τ_0_0, () -> τ_0_1) -> Swift.Bool, _: @autoclosure () -> τ_0_1, expression: Testing.__Expression, comments: @autoclosure () -> Swift.Array<Testing.Comment>, isRequired: Swift.Bool, sourceLocation: Testing.SourceLocation) -> Swift.Result<(), Swift.Error> + 528
    frame #3286: 0x0000000102f9a55c Testing`Testing.__checkValue(_: Swift.Bool, expression: Testing.__Expression, expressionWithCapturedRuntimeValues: @autoclosure () -> Swift.Optional<Testing.__Expression>, mismatchedErrorDescription: @autoclosure () -> Swift.Optional<Swift.String>, difference: @autoclosure () -> Swift.Optional<Swift.String>, mismatchedExitConditionDescription: @autoclosure () -> Swift.Optional<Swift.String>, comments: @autoclosure () -> Swift.Array<Testing.Comment>, isRequired: Swift.Bool, sourceLocation: Testing.SourceLocation) -> Swift.Result<(), Swift.Error> + 916
    frame #3287: 0x0000000102f9c828 Testing`Testing.__checkBinaryOperation<τ_0_0, τ_0_1>(_: τ_0_0, _: (τ_0_0, () -> τ_0_1) -> Swift.Bool, _: @autoclosure () -> τ_0_1, expression: Testing.__Expression, comments: @autoclosure () -> Swift.Array<Testing.Comment>, isRequired: Swift.Bool, sourceLocation: Testing.SourceLocation) -> Swift.Result<(), Swift.Error> + 576
  * frame #3288: 0x0000000100dba64c SwiftExpectReproTests`testSimplestRepro() [inlined] freestanding macro expansion #1 of expect in module SwiftExpectReproTests file SwiftExpectReproTests.swift line 7 column 5 at @__swiftmacro_21SwiftExpectReproTests0032SwiftExpectReproTestsswift_jIADjfMX6_4_6expectfMf_.swift:1:1
    frame #3289: 0x0000000100dba43c SwiftExpectReproTests`testSimplestRepro() at SwiftExpectReproTests.swift:7:5
    frame #3290: 0x0000000100dba744 SwiftExpectReproTests`closure #2 in $s21SwiftExpectReproTests012testSimplestC04TestfMp_23functestSimplestRepro__fMu_@Sendable () at @__swiftmacro_21SwiftExpectReproTests012testSimplestC04TestfMp_.swift:6:20
    frame #3291: 0x00000001030484b4 Testing`(3) await resume partial function for Testing.__ifMainActorIsolationEnforced<τ_0_0 where τ_0_0: Swift.Sendable>(_: @Swift.MainActor @Sendable () async throws -> τ_0_0, else: @Sendable () async throws -> τ_0_0) async throws -> τ_0_0
    frame #3292: 0x0000000100db9e70 SwiftExpectReproTests`$s21SwiftExpectReproTests012testSimplestC04TestfMp_23functestSimplestRepro__fMu_@Sendable () at @__swiftmacro_21SwiftExpectReproTests012testSimplestC04TestfMp_.swift:3:13
    frame #3293: 0x0000000102fdafec Testing`(4) await resume partial function for closure #1 () async throws -> () in closure #1 () async -> () in Testing.Runner._runTestCase(_: Testing.Test.Case, within: Testing.Runner.Plan.Step) async throws -> ()
    frame #3294: 0x0000000102f66448 Testing`(1) await resume partial function for partial apply forwarder for closure #1 () -> sending τ_0_1 in Testing.__checkClosureCall<τ_0_0, τ_0_1 where τ_0_0: Swift.Equatable, τ_0_0: Swift.Error>(throws: τ_0_0, performing: () async throws -> τ_0_1, expression: Testing.__Expression, comments: @autoclosure () -> Swift.Array<Testing.Comment>, isRequired: Swift.Bool, sourceLocation: Testing.SourceLocation) async -> Swift.Result<(), Swift.Error>
    frame #3295: 0x0000000102fb1b94 Testing`(2) await resume partial function for function signature specialization <Arg[4] = Dead> of static Testing.Issue.withErrorRecording(at: Testing.SourceLocation, configuration: Swift.Optional<Testing.Configuration>, isolation: isolated Swift.Optional<Swift.Actor>, _: () async throws -> ()) async -> Swift.Optional<Swift.Error>
    frame #3296: 0x0000000102fda504 Testing`(2) await resume partial function for closure #1 () async -> () in Testing.Runner._runTestCase(_: Testing.Test.Case, within: Testing.Runner.Plan.Step) async throws -> ()
    frame #3297: 0x0000000102f66448 Testing`(1) await resume partial function for partial apply forwarder for closure #1 () -> sending τ_0_1 in Testing.__checkClosureCall<τ_0_0, τ_0_1 where τ_0_0: Swift.Equatable, τ_0_0: Swift.Error>(throws: τ_0_0, performing: () async throws -> τ_0_1, expression: Testing.__Expression, comments: @autoclosure () -> Swift.Array<Testing.Comment>, isRequired: Swift.Bool, sourceLocation: Testing.SourceLocation) async -> Swift.Result<(), Swift.Error>
    frame #3298: 0x0000000270693e18 libswift_Concurrency.dylib`(2) await resume partial function for Swift.TaskLocal.withValueImpl<τ_0_0>(_: __owned τ_0_0, operation: () async throws -> τ_1_0, isolation: isolated Swift.Optional<Swift.Actor>, file: Swift.String, line: Swift.UInt) async throws -> τ_1_0
    frame #3299: 0x0000000270693ab4 libswift_Concurrency.dylib`(2) await resume partial function for Swift.TaskLocal.withValue<τ_0_0>(_: τ_0_0, operation: () async throws -> τ_1_0, isolation: isolated Swift.Optional<Swift.Actor>, file: Swift.String, line: Swift.UInt) async throws -> τ_1_0
    frame #3300: 0x0000000102fdc5b4 Testing`(2) await resume partial function for generic specialization <()> of static Testing.Test.Case.withCurrent<τ_0_0>(_: Testing.Test.Case, perform: () async throws -> τ_0_0) async throws -> τ_0_0
    frame #3301: 0x0000000102fd9f74 Testing`(2) await resume partial function for Testing.Runner._runTestCase(_: Testing.Test.Case, within: Testing.Runner.Plan.Step) async throws -> ()
    frame #3302: 0x0000000102fd99f0 Testing`(1) await resume partial function for closure #2 @Sendable (Testing.Test.Case) async throws -> () in Testing.Runner._runTestCases<τ_0_0 where τ_0_0: Swift.Sequence, τ_0_0.Element == Testing.Test.Case>(_: τ_0_0, within: Testing.Runner.Plan.Step) async throws -> ()
    frame #3303: 0x0000000102f66448 Testing`(1) await resume partial function for partial apply forwarder for closure #1 () -> sending τ_0_1 in Testing.__checkClosureCall<τ_0_0, τ_0_1 where τ_0_0: Swift.Equatable, τ_0_0: Swift.Error>(throws: τ_0_0, performing: () async throws -> τ_0_1, expression: Testing.__Expression, comments: @autoclosure () -> Swift.Array<Testing.Comment>, isRequired: Swift.Bool, sourceLocation: Testing.SourceLocation) async -> Swift.Result<(), Swift.Error>
    frame #3304: 0x0000000102fe5e0c Testing`(1) await resume partial function for generic not re-abstracted specialization <Testing.Test.Case, Swift.LazyFilterSequence<Swift.AnySequence<Testing.Test.Case>>> of closure #1 () async throws -> () in closure #1 (inout Swift.ThrowingTaskGroup<(), Swift.Error>) async throws -> () in Testing.Runner._forEach<τ_0_0, τ_0_1 where τ_0_0: Swift.Sendable, τ_0_0 == τ_0_1.Element, τ_0_1: Swift.Sequence>(in: τ_0_1, for: Swift.Optional<Testing.Runner.Plan.Step>, _: @Sendable (τ_0_0) async throws -> ()) async throws -> ()
    frame #3305: 0x0000000102f66448 Testing`(1) await resume partial function for partial apply forwarder for closure #1 () -> sending τ_0_1 in Testing.__checkClosureCall<τ_0_0, τ_0_1 where τ_0_0: Swift.Equatable, τ_0_0: Swift.Error>(throws: τ_0_0, performing: () async throws -> τ_0_1, expression: Testing.__Expression, comments: @autoclosure () -> Swift.Array<Testing.Comment>, isRequired: Swift.Bool, sourceLocation: Testing.SourceLocation) async -> Swift.Result<(), Swift.Error>

Expected behavior

I'd expect it to print the failed assertion, like it does if only two of the items have references to the parent.

Environment

swift-driver version: 1.115 Apple Swift version 6.0.2 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
Target: arm64-apple-macosx15.0

IPS Crash Report

Additional information

Possibly related:

https://github.com/swiftlang/swift-testing/blob/57335d72b1ed5dda16db61c35dd4551976bda920/Sources/Testing/SourceAttribution/Expression.swift#L439

https://github.com/swiftlang/swift-testing/blob/57335d72b1ed5dda16db61c35dd4551976bda920/Sources/Testing/SourceAttribution/Expression.swift#L238

@dleavitt dleavitt added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. crash Bug: A crash, i.e., an abnormal termination of software triage needed This issue needs more specific labels labels Feb 6, 2025
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. crash Bug: A crash, i.e., an abnormal termination of software triage needed This issue needs more specific labels
Projects
None yet
Development

No branches or pull requests

1 participant