bpo-35214: Disable getc_unlocked() with MemorySanitizer.#10499
bpo-35214: Disable getc_unlocked() with MemorySanitizer.#10499gpshead merged 1 commit intopython:masterfrom
Conversation
clang's MemorySanitizer understand getc() but does not understand getc_unlocked(). Workaround: Don't use it on msan builds.
|
Is there a bug filed with MSAN (compiler-rt) for this? |
Looking into that... Someone on our internal clang team said this (in 2015) on an internal bug that was was fixed using this workaround instead because of: """This can be fixed in MSan, but it may take time. The whole thing is quite messy: _unlocked IO functions access internals of FILE* in glibc headers, which means that MSan needs to catch all cases when glibc (an uninstrumented library) updates buffer pointers inside FILE and unpoison the new target region. Disabling HAVE_GETC_UNLOCKED under #ifdef MEMORY_SANITIZER is definitely better than what we have now.""" I'm pointing them here to see if anything about that has changed (I'd assume not) while I wait for a clang compiler-rt bugzilla account to be created for me. |
|
Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7. |
|
GH-10500 is a backport of this pull request to the 3.7 branch. |
clang's MemorySanitizer understand getc() but does not understand getc_unlocked(). Workaround: Don't use it on msan builds. (cherry picked from commit e6c77d8) Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
GH-10501 is a backport of this pull request to the 3.6 branch. |
clang's MemorySanitizer understand getc() but does not understand getc_unlocked(). Workaround: Don't use it on msan builds. (cherry picked from commit e6c77d8) Co-authored-by: Gregory P. Smith <greg@krypto.org>
clang's MemorySanitizer understand getc() but does not understand getc_unlocked(). Workaround: Don't use it on msan builds. (cherry picked from commit e6c77d8) Co-authored-by: Gregory P. Smith <greg@krypto.org>
clang's MemorySanitizer understand getc() but does not understand getc_unlocked(). Workaround: Don't use it on msan builds. (cherry picked from commit e6c77d8) Co-authored-by: Gregory P. Smith <greg@krypto.org>
clang's MemorySanitizer understand getc() but does not understand
getc_unlocked(). Workaround: Don't use it on msan builds.
https://bugs.python.org/issue35214