bpo-46887: Work around clang MSAN bug on stat()/fstat() by vstinner · Pull Request #31633 · python/cpython
Conversation
Initialize the input "struct stat" buffer with zeros to prevent a false alarm on calling stat() and fstat().
| STRUCT_STAT st; | ||
| int result; | ||
|
|
||
| # if __has_feature(memory_sanitizer) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It requires a check if __has_feature is defined
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pyport.h defines _Py_MEMORY_SANITIZER for us, taking care of all of the compiler/platform conditionals around this.
I don't want to merge this PR, I would prefer to wait until llvm/llvm-project#54131 is fixed. Problem: LLVM told me that LLVM is fined, it's a Fedora issue. Ah.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters