Files
swift-mirror/lib/SILGen/SILGenConstructor.cpp
Gabor Horvath fe3cc6d024 [cxx-interop] Handle Unowned values in implicit value ctors
We usually have unowned values when dealing with foreign types. Make
sure the implicit value ctors will do a +1 to balance the releases. In a
release build we had a use after free over-releasing the object. In
assert builds we had an assertion failure:

Assertion failed: (value->getOwnershipKind() == OwnershipKind::Guaranteed),
function forBorrowedObjectRValue, file ManagedValue.h, line 181.

rdar://160232360
2025-09-12 12:01:59 +01:00

73 KiB