Valet: iOS 15 crash on `specialized static SecItem.copy(matching:)`
Getting intermittent crash reports from devices running on iOS 15. Not sure if this is associated with Security framework or Valet.
Valet version- 4.1.2
I’m using a valet with basic initialisation:
let keychain = Valet.valet(with: Identifier.init(nonEmpty: "identifier")!, accessibility: .afterFirstUnlock)
The crash reports highlights line 25 specialized static SecItem.copy<A>(matching:)
and Xcode organiser points to a line in code where it’s accessing a string from keychain:
keychain.string(forKey: "key")
The stack trace from Crashlytics:
Crashed: com.apple.root.user-initiated-qos
0 libsystem_kernel.dylib 0x79c4 __pthread_kill + 8
1 libsystem_pthread.dylib 0x7434 pthread_kill + 268
2 libsystem_c.dylib 0x1ff64 abort + 164
3 libsystem_malloc.dylib 0x1bac8 _malloc_put + 550
4 libsystem_malloc.dylib 0x1bd64 malloc_zone_error + 104
5 libsystem_malloc.dylib 0x162c8 nanov2_allocate_from_block + 568
6 libsystem_malloc.dylib 0x1536c nanov2_allocate + 128
7 libsystem_malloc.dylib 0x15288 nanov2_malloc + 64
8 libsystem_malloc.dylib 0x5594 _malloc_zone_malloc + 156
9 CoreFoundation 0xed28 __CFBasicHashRehash + 376
10 CoreFoundation 0x206e4 __CFBasicHashAddValue + 104
11 CoreFoundation 0x14200 CFBasicHashAddValue + 2108
12 CoreFoundation 0x5d340 CFDictionaryAddValue + 348
13 Security 0x538c der_decode_dictionary + 248
14 Security 0x13d6c der_decode_plist + 1172
15 Security 0x115c4 SecXPCDictionaryCopyPList + 120
16 Security 0x16c8c SecXPCDictionaryCopyPListOptional + 72
17 Security 0x12aa0 securityd_send_sync_and_do + 136
18 Security 0xb55e0 cftype_to_bool_cftype_error_request + 160
19 Security 0x464c __SecItemCopyMatching_block_invoke_2 + 224
20 Security 0x5030 __SecItemAuthDoQuery_block_invoke + 540
21 Security 0x3790 SecItemAuthDoQuery + 1292
22 Security 0x4b98 __SecItemCopyMatching_block_invoke + 144
23 Security 0xaf58 SecOSStatusWith + 56
24 Security 0x48b8 SecItemCopyMatching + 400
25 ** 0x1c9c770 specialized static SecItem.copy<A>(matching:) + 4362553200
26 ** 0x1c9eb88 specialized static Keychain.object(forKey:options:) + 4362562440
27 ** 0x1cb0988 Valet.string(forKey:) + 4362635656
PS- lines 25, 26 & 27 shows the app name which I’ve replaced with **.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18
Thank you for digging in, and apologies that I don’t have more actionable thoughts for you in the interim. Please do circle back and let us know what you find.
I’m currently only seeing this on iOS 15.x devices. Not sure if it’s related to Valet either. I’ll do some more debugging to see if I can find out.
I went away buy upgrading XCode on my CI. Ot was on 13.0… with 13.2 all looks good.
Thank you!
On Mon, 17 Jan 2022 at 16:11, Dan Federman @.***> wrote: