nagachika
72d9d4b935
merge revision(s) 670f6c1541: [Backport #22479 ]
...
[PATCH] Keep the symlink target alive while realpath_rec reads it
realpath_rec reads the names of a symlink target through a raw pointer
into the string returned by rb_readlink, while it calls itself to resolve
those names. RB_GC_GUARD(link_orig) keeps that string alive only for an
absolute target. For a relative target, link_orig is Qnil and nothing
uses `link` after the recursive call, so GC can free the string while the
later names are still being read.
File.realdirpath then returns a wrong path: the unresolved symlink path,
or a path with NUL bytes, which makes Pathname.new raise "pathname
contains null byte". CocoaPods calls Pathname#realdirpath for every
source file, and pnpm installs packages behind relative symlinks, so
`pod install` fails at random in such projects.
File.realpath is not affected on platforms with realpath(3), because only
RB_REALPATH_DIR uses realpath_rec there.
Fixes [Bug #22479 ]
2026-10-28 21:31:46 +09:00
..
2024-04-04 13:29:41 +09:00
2023-12-21 17:47:36 -08:00
2024-11-01 11:50:00 +09:00
2025-12-12 08:56:50 -08:00
2024-04-04 18:54:54 +09:00
2023-04-24 07:37:20 -07:00
2026-10-12 14:20:29 +09:00
2025-02-13 21:08:44 -08:00
2026-06-14 12:16:08 +09:00
2024-09-11 18:13:01 +09:00
2026-05-16 10:25:00 +09:00
2024-03-04 13:07:26 +11:00
2025-12-08 14:44:48 -08:00
2025-12-12 08:56:50 -08:00
2024-09-18 11:16:22 +09:00
2024-08-20 18:36:16 +09:00
2024-02-09 17:38:54 +01:00
2023-10-25 16:34:48 +09:00
2026-09-20 15:26:43 +09:00
2024-09-21 20:00:23 +02:00
2024-03-04 13:07:26 +11:00
2026-01-25 17:47:37 +09:00
2024-03-23 23:58:40 +09:00
2026-06-14 12:24:08 +09:00
2024-03-16 23:44:07 +09:00
2024-09-12 10:04:10 -07:00
2026-09-20 15:26:43 +09:00
2024-12-24 11:40:00 +09:00
2026-10-12 13:34:44 +09:00
2025-02-13 18:01:42 -08:00
2026-08-09 15:59:47 +09:00
2024-12-23 09:39:08 +09:00
2026-08-09 15:52:00 +09:00
2026-07-18 13:08:53 +09:00
2026-09-23 13:30:55 +09:00
2026-10-28 21:31:46 +09:00
2025-03-10 12:04:54 -07:00
2024-10-11 15:29:10 -04:00
2024-11-14 10:46:36 +00:00
2026-06-29 19:15:38 +09:00
2026-09-20 14:26:37 +09:00
2023-01-15 13:03:27 +09:00
2025-04-14 16:21:51 +09:00
2026-09-20 15:26:43 +09:00
2026-09-26 21:38:21 +09:00
2025-03-27 15:23:31 -07:00
2026-10-25 22:50:27 +09:00
2024-09-13 16:52:38 +09:00
2026-09-23 13:27:15 +09:00
2023-09-12 11:25:07 -04:00
2026-10-12 13:52:04 +09:00
2026-09-20 14:09:25 +09:00
2024-09-12 13:43:04 -04:00
2026-05-28 22:37:07 +09:00
2025-12-08 14:29:57 -08:00
2026-09-20 15:26:43 +09:00
2024-09-12 13:43:04 -04:00
2025-03-20 09:41:35 -07:00
2025-08-27 15:19:58 -07:00
2026-01-25 17:41:02 +09:00
2024-11-29 20:41:00 -08:00
2024-10-15 09:10:35 -04:00
2024-11-26 14:31:08 -05:00
2026-09-20 15:26:43 +09:00
2026-08-09 14:39:23 +09:00
2024-10-03 18:47:09 +09:00
2026-10-04 19:29:33 +09:00
2026-10-17 14:24:19 +09:00
2024-11-29 03:01:46 +09:00
2024-12-16 20:54:40 +09:00
2026-10-17 13:21:36 +09:00
2024-11-08 19:48:56 +09:00
2025-12-16 15:51:44 -08:00
2026-10-23 11:43:06 +09:00
2023-09-13 10:43:10 +09:00
2025-10-07 09:41:15 -07:00
2025-12-08 14:24:18 -08:00
2024-07-18 21:15:54 -04:00
2026-08-09 16:03:39 +09:00
2024-04-11 09:04:31 +02:00
2024-11-08 22:13:15 -07:00
2024-09-17 10:34:26 -04:00
2026-09-21 17:18:30 +09:00
2023-08-02 19:55:30 +09:00
2024-09-17 10:34:26 -04:00
2026-10-12 14:22:20 +09:00
2025-07-14 14:30:53 -07:00
2026-09-06 17:38:25 +09:00
2024-09-17 14:15:44 +09:00
2026-06-14 12:22:16 +09:00
2023-05-01 05:10:34 +09:00
2023-03-10 11:54:59 +09:00
2023-09-27 19:57:50 +01:00
2026-10-17 14:16:01 +09:00
2024-03-07 13:08:37 +09:00
2024-12-24 13:25:55 +09:00
2026-09-23 13:23:20 +09:00
2026-09-06 15:00:16 +09:00
2024-11-06 15:45:32 +09:00
2024-06-12 10:25:57 -07:00
2024-08-23 16:37:11 -04:00
2024-08-22 10:01:55 -04:00
2023-12-27 17:50:15 +09:00
2023-10-13 08:52:23 -07:00
2026-05-09 14:57:47 +09:00