diff options
author | Gregory P. Smith <greg@krypto.org> | 2018-11-13 06:01:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-13 06:01:22 (GMT) |
commit | 3015fb8ce4d25603434b9b44bb7effb98a481532 (patch) | |
tree | a76d3bbd890685a151c19b48bd5d8346eb7e7276 /Modules | |
parent | 0dc1e45dfd242493ecdac5dbcad51dbc8f922de7 (diff) | |
download | cpython-3015fb8ce4d25603434b9b44bb7effb98a481532.zip cpython-3015fb8ce4d25603434b9b44bb7effb98a481532.tar.gz cpython-3015fb8ce4d25603434b9b44bb7effb98a481532.tar.bz2 |
bpo-35214: Add _Py_ prefix to MEMORY_SANITIZER def. (GH-10503)
Rename our new MEMORY_SANITIZER define to _Py_MEMORY_SANITIZER.
Project based C Preprocessor namespacing at its finest. :P
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ctypes/callproc.c | 4 | ||||
-rw-r--r-- | Modules/_posixsubprocess.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index 33b7055..d485c58 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -75,7 +75,7 @@ #include <alloca.h> #endif -#ifdef MEMORY_SANITIZER +#ifdef _Py_MEMORY_SANITIZER #include <sanitizer/msan_interface.h> #endif @@ -1129,7 +1129,7 @@ PyObject *_ctypes_callproc(PPROC pProc, rtype = _ctypes_get_ffi_type(restype); resbuf = alloca(max(rtype->size, sizeof(ffi_arg))); -#ifdef MEMORY_SANITIZER +#ifdef _Py_MEMORY_SANITIZER /* ffi_call actually initializes resbuf, but from asm, which * MemorySanitizer can't detect. Avoid false positives from MSan. */ if (resbuf != NULL) { diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c index 7ee3f71..2b2c57d 100644 --- a/Modules/_posixsubprocess.c +++ b/Modules/_posixsubprocess.c @@ -21,7 +21,7 @@ #include <dirent.h> #endif -#ifdef MEMORY_SANITIZER +#ifdef _Py_MEMORY_SANITIZER # include <sanitizer/msan_interface.h> #endif @@ -291,7 +291,7 @@ _close_open_fds_safe(int start_fd, PyObject* py_fds_to_keep) sizeof(buffer))) > 0) { struct linux_dirent64 *entry; int offset; -#ifdef MEMORY_SANITIZER +#ifdef _Py_MEMORY_SANITIZER __msan_unpoison(buffer, bytes); #endif for (offset = 0; offset < bytes; offset += entry->d_reclen) { |