[3.13] gh-124043: Disallow mixing --with-trace-refs and --disable-gil (GH-124078) (#124138)

gh-124043: Disallow mixing `--with-trace-refs` and `--disable-gil` (GH-124078)

Tracing references is not currently thread-safe in the free-threaded build.
(cherry picked from commit 3b45df03a4)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-09-24 02:24:35 +02:00 committed by GitHub
parent 9d21c46e31
commit 8af2d18111
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,2 @@
Building using :option:`--with-trace-refs` is (temporarily) disallowed when the
GIL is disabled.

4
configure generated vendored
View file

@ -8232,6 +8232,10 @@ printf "%s\n" "#define Py_TRACE_REFS 1" >>confdefs.h
fi
if test "$disable_gil" = "yes" -a "$with_trace_refs" = "yes";
then
as_fn_error $? "--disable-gil cannot be used with --with-trace-refs" "$LINENO" 5
fi
# Check for --enable-pystats
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-pystats" >&5

View file

@ -1777,6 +1777,10 @@ then
[Define if you want to enable tracing references for debugging purpose])
fi
if test "$disable_gil" = "yes" -a "$with_trace_refs" = "yes";
then
AC_MSG_ERROR([--disable-gil cannot be used with --with-trace-refs])
fi
# Check for --enable-pystats
AC_MSG_CHECKING([for --enable-pystats])