Skip to content

Commit

Permalink
_posixsubprocess: disable vfork when running with ASAN
Browse files Browse the repository at this point in the history
  • Loading branch information
colesbury committed Apr 23, 2023
1 parent 7507a77 commit a62d376
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Modules/_posixsubprocess.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@
#endif

#if defined(__linux__) && defined(HAVE_VFORK) && defined(HAVE_SIGNAL_H) && \
defined(HAVE_PTHREAD_SIGMASK) && !defined(HAVE_BROKEN_PTHREAD_SIGMASK)
/* If this is ever expanded to non-Linux platforms, verify what calls are
defined(HAVE_PTHREAD_SIGMASK) && !defined(HAVE_BROKEN_PTHREAD_SIGMASK) && \
!defined(_Py_ADDRESS_SANITIZER)
/* Older versions of ASAN do not support vfork(). For example, GCC 9.4.0
* will generate false positives with vfork() and ASAN.
* If this is ever expanded to non-Linux platforms, verify what calls are
* allowed after vfork(). Ex: setsid() may be disallowed on macOS? */
# include <signal.h>
# define VFORK_USABLE 1
Expand Down

0 comments on commit a62d376

Please sign in to comment.