diff options
author | Gregory P. Smith <greg@krypto.org> | 2018-11-13 03:47:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-13 03:47:13 (GMT) |
commit | e6c77d8301ec1703abb755a7d3ce5bd8c999c082 (patch) | |
tree | 3d4d59f8d8d37ba72b2a664aff9e6198000a0fe0 /Objects/fileobject.c | |
parent | 2c07c493d2eb45101312e3eb3a77f94d0c9cad1f (diff) | |
download | cpython-e6c77d8301ec1703abb755a7d3ce5bd8c999c082.zip cpython-e6c77d8301ec1703abb755a7d3ce5bd8c999c082.tar.gz cpython-e6c77d8301ec1703abb755a7d3ce5bd8c999c082.tar.bz2 |
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.
Diffstat (limited to 'Objects/fileobject.c')
-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 db788a9..10e8391 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) |