8000 Disable getc_unlocked() with MemorySanitizer. (GH-10499) · python/cpython@e6c77d8 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e6c77d8

Browse files
authored
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.
1 parent 2c07c49 commit e6c77d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Objects/fileobject.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
#define PY_SSIZE_T_CLEAN
44
#include "Python.h"
55

6-
#ifdef HAVE_GETC_UNLOCKED
6+
#if defined(HAVE_GETC_UNLOCKED) && !defined(MEMORY_SANITIZER)
7+
/* clang MemorySanitizer doesn't yet understand getc_unlocked. */
78
#define GETC(f) getc_unlocked(f)
89
#define FLOCKFILE(f) flockfile(f)
910
#define FUNLOCKFILE(f) funlockfile(f)

0 commit comments

Comments
 (0)
0