File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -815,11 +815,16 @@ void swift::swift_deallocClassInstance(HeapObject *object,
815
815
size_t allocatedSize,
816
816
size_t allocatedAlignMask) {
817
817
size_t retainCount = swift_retainCount (object);
818
- if (SWIFT_UNLIKELY (retainCount > 1 ))
818
+ if (SWIFT_UNLIKELY (retainCount > 1 )) {
819
+ auto descriptor = object->metadata ->getTypeContextDescriptor ();
820
+
819
821
swift::fatalError (0 ,
820
- " Object %p deallocated with retain count %zd, reference "
821
- " may have escaped from deinit.\n " ,
822
- object, retainCount);
822
+ " Object %p of class %s deallocated with retain count %zd, "
823
+ " reference may have escaped from deinit.\n " ,
824
+ object,
825
+ descriptor ? descriptor->Name .get () : " <unknown>" ,
826
+ retainCount);
827
+ }
823
828
824
829
#if SWIFT_OBJC_INTEROP
825
830
// We need to let the ObjC runtime clean up any associated objects or weak
You can’t perform that action at this time.
0 commit comments