diff options
author | Gregory P. Smith <greg@krypto.org> | 2018-12-31 01:05:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-31 01:05:36 (GMT) |
commit | b474e6774d60fa67d5373e361a0ed53c18b24f53 (patch) | |
tree | a9c0edd450e759793af792d039f6396af3cfaf51 /Modules/timemodule.c | |
parent | 387512c7ecde6446f2e29408af2e16b9fc043807 (diff) | |
download | cpython-b474e6774d60fa67d5373e361a0ed53c18b24f53.zip cpython-b474e6774d60fa67d5373e361a0ed53c18b24f53.tar.gz cpython-b474e6774d60fa67d5373e361a0ed53c18b24f53.tar.bz2 |
bpo-35214: MSan workarounds for socket, time, and test_faulthandler. (GH-11375)
Add Clang Memory Sanitizer build instrumentation to work around
false positives from the socket and time modules as well as skipping
a couple test_faulthandler tests.
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r-- | Modules/timemodule.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index cf65229..43951d5 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -34,6 +34,10 @@ #endif /* MS_WINDOWS */ #endif /* !__WATCOMC__ || __QNX__ */ +#ifdef _Py_MEMORY_SANITIZER +# include <sanitizer/msan_interface.h> +#endif + #define SEC_TO_NS (1000 * 1000 * 1000) /* Forward declarations */ @@ -336,6 +340,9 @@ time_pthread_getcpuclockid(PyObject *self, PyObject *args) PyErr_SetFromErrno(PyExc_OSError); return NULL; } +#ifdef _Py_MEMORY_SANITIZER + __msan_unpoison(&clk_id, sizeof(clk_id)); +#endif return PyLong_FromLong(clk_id); } |