[PATCH] D58835: [Support] Treat truncation of fullpath as error
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 1 12:44:10 PST 2019
zturner added inline comments.
================
Comment at: llvm/lib/Support/Unix/Path.inc:114
+ if (chars >= PATH_MAX)
+ return 1;
if (!realpath(fullpath, ret))
----------------
efriedma wrote:
> The use of PATH_MAX here seems dubious; in practice, many targets support paths longer than PATH_MAX. Probably should just use a raw_string_ostream or something like that instead of snprintf to a fixed buffer.
Even better, `llvm::sys::path::join()`. I'm not sure why all of these global functions operate on raw pointers instead of LLVM's string ADTs.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58835/new/
https://reviews.llvm.org/D58835
More information about the llvm-commits
mailing list