Files
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 18:54:54 +09:00
2024-09-18 11:16:22 +09:00
2026-10-25 22:50:27 +09:00
2026-05-28 22:37:07 +09:00
2024-11-29 03:01:46 +09:00
2024-11-08 19:48:56 +09:00
2026-09-21 17:18:30 +09:00
2023-03-10 11:54:59 +09:00
2024-08-22 10:01:55 -04:00
…