Created by mistake, please refer here: https://reviews.llvm.org/D151567
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Please add comments to the patch description explaining what's changing and why (this helps reviewers as well as during code archeology after the changes land).
llvm/lib/Support/Unix/Path.inc | ||
---|---|---|
17 | Please do not include iostream: https://llvm.org/docs/CodingStandards.html#include-iostream-is-forbidden | |
1017–1024 | This introduces a TOCTOU issue with the code -- there's now a window where stat will return the status of the file but that status can change before the call to open. |
llvm/lib/Support/Unix/Path.inc | ||
---|---|---|
1017–1024 | I think non-AIX non-MVS systems don't want to introduce this behavior (TOCTOU). |
llvm/lib/Support/Unix/Path.inc | ||
---|---|---|
1017–1024 | Presumably the open call can be made first and fstat can then be used. |
Please do not include iostream: https://llvm.org/docs/CodingStandards.html#include-iostream-is-forbidden