[PATCH] D58835: [Support] Treat truncation of fullpath as error
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 1 12:40:00 PST 2019
efriedma added inline comments.
================
Comment at: llvm/lib/Support/Unix/Path.inc:114
+ if (chars >= PATH_MAX)
+ return 1;
if (!realpath(fullpath, ret))
----------------
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.
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