[all-commits] [llvm/llvm-project] 01b8b7: [libc][realpath] Follow symlinks
Jackson Stogel via All-commits
all-commits at lists.llvm.org
Sun Jul 26 19:23:34 PDT 2026
Branch: refs/heads/users/jtstogel/realpath/follow-symlinks
Home: https://github.com/llvm/llvm-project
Commit: 01b8b7cd0199a1b990b1509188ac6106ed45787e
https://github.com/llvm/llvm-project/commit/01b8b7cd0199a1b990b1509188ac6106ed45787e
Author: jtstogel <jtstogel at gmail.com>
Date: 2026-07-26 (Sun, 26 Jul 2026)
Changed paths:
M libc/src/stdlib/linux/CMakeLists.txt
M libc/src/stdlib/linux/realpath.cpp
M libc/test/src/stdlib/CMakeLists.txt
M libc/test/src/stdlib/realpath_test.cpp
Log Message:
-----------
[libc][realpath] Follow symlinks
This commit updates realpath to call readlinkat on symlinks during path resolution. In order to do, it updates `PendingPath` to store a `cpp::string` that is prepended with a symlink target when resolved. This could be more efficient by using a `PATH_MAX` buffer and storing the path at the end of the buffer, but using a `cpp::string` avoids the pointer arithmetic and manual memory management that comes with that approach.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list