summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorYuta Saito <[email protected]>2024-10-09 21:46:15 +0900
committerYuta Saito <[email protected]>2024-10-10 13:40:59 +0900
commitc77f0b91342935f661c6e5ba0f6f5c19427da174 ()
treebc32d48f98464dc5af3f6cf4b01f3dd9dba0401a /file.c
parente00b746b7578ed7b2f168cb7bc867ef3c8cbca69 (diff)
[Bug #20631] Workaround for macOS 15.0 fork crash
macOS 15.0 24A5331b seems to have a weird issue that `CFStringCreateWithBytesNoCopy` does not return `NSTaggedPointerString` instance for the first call. This issue is fixed in macOS 15.1 but we need to workaround it for macOS 15.0.
Notes: Merged: https://.com/ruby/ruby/pull/11849
-rw-r--r--file.c12
1 files changed, 10 insertions, 2 deletions
@@ -310,8 +310,16 @@ rb_CFString_class_initialize_before_fork(void)
const char small_str[] = "/";
long len = sizeof(small_str) - 1;
CFStringRef s;
- CFMutableStringRef m = mutable_CFString_new(&s, small_str, len);
- mutable_CFString_release(m, s);
}
# endif /* HAVE_WORKING_FORK */