[libcxx-commits] [libcxx] [libc++] Fix UB in filesystem::__copy for non-existent destination. (PR #87615)

Afanasyev Ivan via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 22 05:21:29 PDT 2024


ivafanas wrote:

Hi!

I've searched for docs here:
https://linux.die.net/man/2/stat
https://man7.org/linux/man-pages/man2/stat.2.html

It does not state that `buf` parameter is not affected if error is returned. It is quite strange to update `buf` on failure, but, well, documentation allows it.

Problem is found on kernel 5.4.0 for the custom linux provided by our customer. Have no idea whether posix implementation of `stat` function is standard or customized.

https://github.com/llvm/llvm-project/pull/87615


More information about the libcxx-commits mailing list