So, I did get the chance to play a bit with the workaround (followed your step with a local copy that I codesigned) - some good and some bad news;
Of the subcommands supported by swift-inspect:
SUBCOMMANDS:
dump-conformance-cache Print the contents of the target's protocol conformance cache.
dump-raw-metadata Print the target's metadata allocations.
dump-generic-metadata Print the target's generic metadata allocations.
dump-cache-nodes Print the target's metadata cache nodes.
dump-arrays Print information about array objects in the target.
dump-concurrency Print information about the target's concurrency runtime.
See 'swift-inspect help <subcommand>' for detailed help.
I could get dump-conformance-cache
to work and provide output (so it worked for this case);
The metadata stuff and cache-nodes weren't "enabled" which might be expected for a release build?:
hassila@ice ~/g/ordo (main)> arch -arch x86_64 ./swift-inspect dump-generic-metadata 1223
Error: remote process does not have metadata allocation iteration enabled
hassila@ice ~/g/ordo (main) [1]> arch -arch x86_64 ./swift-inspect dump-raw-metadata 1223
Error: remote process does not have metadata allocation iteration enabled
hassila@ice ~/g/ordo (main) [1]> arch -arch x86_64 ./swift-inspect dump-cache-nodes 1223
Address Tag Tag Name Size Left Right
Error: remote process does not have metadata allocation iteration enabled
While finally dump-arrays (and concurrency, which was my main interest) both fails:
hassila@ice ~/g/ordo (main) [1]> arch -arch x86_64 ./swift-inspect dump-arrays 1223
Address Size Count Is Class
2024-03-25 18:45:37.176 swift-inspect[2799:16189556] libsystem_malloc.dylib in target process is different than in analysis process, which can cause problems analyzing memory. You may need to relaunch the target process and analysis process to get the new version of the framework. The dyld shared cache may also be out of date, which could affect system performance. To update the dyld shared cache, run 'sudo update_dyld_shared_cache' and reboot.
fish: Job 1, 'arch -arch x86_64 ./swift-ins...' terminated by signal SIGBUS (Misaligned address error)
hassila@ice ~/g/ordo (main) [SIGBUS]> arch -arch x86_64 ./swift-inspect dump-concurrency 1223
TASKS
2024-03-25 18:45:58.867 swift-inspect[2929:16190092] libsystem_malloc.dylib in target process is different than in analysis process, which can cause problems analyzing memory. You may need to relaunch the target process and analysis process to get the new version of the framework. The dyld shared cache may also be out of date, which could affect system performance. To update the dyld shared cache, run 'sudo update_dyld_shared_cache' and reboot.
fish: Job 1, 'arch -arch x86_64 ./swift-ins...' terminated by signal SIGBUS (Misaligned address error)
There isn't a direct dependency on libsystem_malloc.dylib
(but I wonder if that is a red herring):
hassila@ice ~/g/ordo (main) [SIGBUS]> otool -L ./swift-inspect
./swift-inspect:
/usr/lib/swift/libswiftRemoteMirror.dylib (compatibility version 1.0.0, current version 0.0.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 2419.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2)
/usr/lib/swift/libswiftCore.dylib (compatibility version 1.0.0, current version 5.10.0)
/usr/lib/swift/libswiftCoreFoundation.dylib (compatibility version 1.0.0, current version 120.100.0, weak)
/usr/lib/swift/libswiftDarwin.dylib (compatibility version 1.0.0, current version 0.0.0)
/usr/lib/swift/libswiftDispatch.dylib (compatibility version 1.0.0, current version 41.0.0, weak)
/usr/lib/swift/libswiftIOKit.dylib (compatibility version 1.0.0, current version 1.0.0, weak)
/usr/lib/swift/libswiftObjectiveC.dylib (compatibility version 1.0.0, current version 8.0.0, weak)
/usr/lib/swift/libswiftXPC.dylib (compatibility version 1.0.0, current version 36.100.7, weak)
/usr/lib/swift/libswift_Concurrency.dylib (compatibility version 1.0.0, current version 5.10.0)
and neither for the app in question:
hassila@ice ~> otool -L /Users/hassila/Library/Developer/Xcode/DerivedData/Ordo-gmejvaknewiunvewtbtnixiriytp/Build/Products/Release/ORdoApp.app/Contents/MacOS/OrdoApp
/Users/hassila/Library/Developer/Xcode/DerivedData/Ordo-gmejvaknewiunvewtbtnixiriytp/Build/Products/Release/ORdoApp.app/Contents/MacOS/OrdoApp:
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1700.255.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 2420.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.12)
/usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 9.0.0)
/usr/lib/libsasl2.2.dylib (compatibility version 3.0.0, current version 3.15.0)
@rpath/Algorithms_-79BF82D738C97CDC_PackageProduct.framework/Versions/A/Algorithms_-79BF82D738C97CDC_PackageProduct (compatibility version 0.0.0, current version 0.0.0)
@rpath/OrdoInternals.framework/Versions/A/OrdoInternals (compatibility version 63.1.0, current version 63.1.0)
@rpath/OrdoEssentials_14A04D918944EDBD_PackageProduct.framework/Versions/A/OrdoEssentials_14A04D918944EDBD_PackageProduct (compatibility version 0.0.0, current version 0.0.0)
@rpath/OrdoEssentials.framework/Versions/A/OrdoEssentials (compatibility version 63.1.0, current version 63.1.0)
@rpath/OrdoObjectSupport.framework/Versions/A/OrdoObjectSupport (compatibility version 1.0.0, current version 1.0.0)
@rpath/PredicateEditor_-61AADD5F1054C4F9_PackageProduct.framework/Versions/A/PredicateEditor_-61AADD5F1054C4F9_PackageProduct (compatibility version 0.0.0, current version 0.0.0)
@rpath/Sparkle.framework/Versions/B/Sparkle (compatibility version 1.6.0, current version 2.5.2)
@rpath/AsyncAlgorithms_-33263E09A32564D9_PackageProduct.framework/Versions/A/AsyncAlgorithms_-33263E09A32564D9_PackageProduct (compatibility version 0.0.0, current version 0.0.0)
@rpath/Collections_47BB0D94F2814A8A_PackageProduct.framework/Versions/A/Collections_47BB0D94F2814A8A_PackageProduct (compatibility version 0.0.0, current version 0.0.0)
@rpath/OrdoConfig.framework/Versions/A/OrdoConfig (compatibility version 63.1.0, current version 63.1.0)
@rpath/OrdoPublic_3CE1D3C59D0CD3FD_PackageProduct.framework/Versions/A/OrdoPublic_3CE1D3C59D0CD3FD_PackageProduct (compatibility version 0.0.0, current version 0.0.0)
@rpath/OrdoPublic.framework/Versions/A/OrdoPublic (compatibility version 63.1.0, current version 63.1.0)
@rpath/Atomics_301F3DE065572157_PackageProduct.framework/Versions/A/Atomics_301F3DE065572157_PackageProduct (compatibility version 0.0.0, current version 0.0.0)
@rpath/Logging_35C93DA702091ECE_PackageProduct.framework/Versions/A/Logging_35C93DA702091ECE_PackageProduct (compatibility version 0.0.0, current version 0.0.0)
@rpath/PluginSupport.framework/Versions/A/PluginSupport (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 2487.50.124)
/System/Library/Frameworks/Combine.framework/Versions/A/Combine (compatibility version 1.0.0, current version 311.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 2420.0.0)
/System/Library/Frameworks/Network.framework/Versions/A/Network (compatibility version 1.0.0, current version 1.0.0, weak)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 61123.100.169)
/System/Library/Frameworks/SwiftUI.framework/Versions/A/SwiftUI (compatibility version 1.0.0, current version 5.4.38)
/usr/lib/swift/libswiftCore.dylib (compatibility version 1.0.0, current version 0.0.0)
/usr/lib/swift/libswiftCoreAudio.dylib (compatibility version 1.0.0, current version 6.0.0, weak)
/usr/lib/swift/libswiftCoreFoundation.dylib (compatibility version 1.0.0, current version 120.100.0, weak)
/usr/lib/swift/libswiftCoreImage.dylib (compatibility version 1.0.0, current version 2.0.0, weak)
/usr/lib/swift/libswiftCoreMedia.dylib (compatibility version 1.0.0, current version 3100.20.2, weak)
/usr/lib/swift/libswiftDarwin.dylib (compatibility version 1.0.0, current version 0.0.0)
/usr/lib/swift/libswiftDispatch.dylib (compatibility version 1.0.0, current version 41.0.0)
/usr/lib/swift/libswiftDistributed.dylib (compatibility version 1.0.0, current version 0.0.0)
/usr/lib/swift/libswiftIOKit.dylib (compatibility version 1.0.0, current version 1.0.0, weak)
/usr/lib/swift/libswiftMetal.dylib (compatibility version 1.0.0, current version 343.14.0, weak)
/usr/lib/swift/libswiftOSLog.dylib (compatibility version 1.0.0, current version 4.0.0, weak)
/usr/lib/swift/libswiftObjectiveC.dylib (compatibility version 1.0.0, current version 8.0.0, weak)
/usr/lib/swift/libswiftObservation.dylib (compatibility version 1.0.0, current version 0.0.0)
/usr/lib/swift/libswiftQuartzCore.dylib (compatibility version 1.0.0, current version 3.0.0, weak)
/usr/lib/swift/libswiftRegexBuilder.dylib (compatibility version 1.0.0, current version 0.0.0)
/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib (compatibility version 1.0.0, current version 791.2.8, weak)
/usr/lib/swift/libswiftXPC.dylib (compatibility version 1.0.0, current version 36.100.7, weak)
/usr/lib/swift/libswift_Concurrency.dylib (compatibility version 1.0.0, current version 0.0.0)
/usr/lib/swift/libswift_StringProcessing.dylib (compatibility version 1.0.0, current version 0.0.0)
/usr/lib/swift/libswiftos.dylib (compatibility version 1.0.0, current version 1049.100.4)