From e17c61c40b53c53a9c543ee9b77279733b2d22e2 Mon Sep 17 00:00:00 2001 From: Tony Parker Date: Thu, 26 Jun 2025 17:08:58 -0500 Subject: [PATCH 1/2] Instead of crashing with unknown types in print, use description (#5207) --- Sources/plutil/PLUContext.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/plutil/PLUContext.swift b/Sources/plutil/PLUContext.swift index 0fb7b3b0dc..46512ae438 100644 --- a/Sources/plutil/PLUContext.swift +++ b/Sources/plutil/PLUContext.swift @@ -772,7 +772,9 @@ struct PrintCommand { let description = number.description result.append("\(description)\n") } else { - throw PLUContextError.argument("Unknown property list type") + // Use a generic description + result.append(String(describing: value)) + result.append("\n") } return result } From ae61520fa3c5a7fcb63efa57b286188e481a0392 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Fri, 27 Jun 2025 21:19:50 -0700 Subject: [PATCH 2/2] Stylistic changes to _CFPosixSpawnFileActionsChdir implementation (#5223) This function is now duplicated or soon to be duplicated across approximately 4 different places throughout the Swift project. Format it stylistically to standardize it everywhere for easier comparison and copy-pasting. --- Sources/CoreFoundation/CFPlatform.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/CoreFoundation/CFPlatform.c b/Sources/CoreFoundation/CFPlatform.c index 238f2ecbc8..926b29ff5c 100644 --- a/Sources/CoreFoundation/CFPlatform.c +++ b/Sources/CoreFoundation/CFPlatform.c @@ -2321,11 +2321,13 @@ CF_EXPORT int _CFPosixSpawnFileActionsChdir(_CFPosixSpawnFileActionsRef file_act // Glibc versions prior to 2.29 don't support posix_spawn_file_actions_addchdir_np, impacting: // - Amazon Linux 2 (EoL mid-2025) return ENOSYS; - #elif defined(__OpenBSD__) || defined(__QNX__) || (defined(__ANDROID__) && __ANDROID_API__ < 34) + #elif defined(__ANDROID__) && __ANDROID_API__ < 34 + // Android versions prior to 14 (API level 34) don't support posix_spawn_file_actions_addchdir_np + return ENOSYS; + #elif defined(__OpenBSD__) || defined(__QNX__) // Currently missing as of: // - OpenBSD 7.5 (April 2024) // - QNX 8 (December 2023) - // - Android 13 return ENOSYS; #elif defined(__GLIBC__) || TARGET_OS_DARWIN || defined(__FreeBSD__) || defined(__ANDROID__) || defined(__musl__) // Pre-standard posix_spawn_file_actions_addchdir_np version available in: