diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-11-12 19:59:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-12 19:59:29 -0800 |
commit | f0b21e18d8398f010707c3c199f97d8466214dd6 (patch) | |
tree | 07a285ef66b3f3f54c5060e3e3c27f0eb93cb705 /Objects | |
parent | 3f9fe53c98978955fea4e36456c784694e6458a8 (diff) | |
download | cpython-git-f0b21e18d8398f010707c3c199f97d8466214dd6.tar.gz |
Disable getc_unlocked() with MemorySanitizer. (GH-10499)
clang's MemorySanitizer understand getc() but does not understand
getc_unlocked(). Workaround: Don't use it on msan builds.
(cherry picked from commit e6c77d8301ec1703abb755a7d3ce5bd8c999c082)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/fileobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 0f71944d52..a49194ef6c 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -3,7 +3,8 @@ #define PY_SSIZE_T_CLEAN #include "Python.h" -#ifdef HAVE_GETC_UNLOCKED +#if defined(HAVE_GETC_UNLOCKED) && !defined(MEMORY_SANITIZER) +/* clang MemorySanitizer doesn't yet understand getc_unlocked. */ #define GETC(f) getc_unlocked(f) #define FLOCKFILE(f) flockfile(f) #define FUNLOCKFILE(f) funlockfile(f) |