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.
This commit is contained in:
Gregory P. Smith 2018-11-12 19:47:13 -08:00 committed by GitHub
parent 2c07c493d2
commit e6c77d8301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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)