https://github.com/python/cpython/commit/469fe33edd92b8586d6995d07384b52170067c76
commit: 469fe33edd92b8586d6995d07384b52170067c76
branch: main
author: Sam Gross <[email protected]>
committer: colesbury <[email protected]>
date: 2025-12-30T19:45:23-05:00
summary:
gh-143121: Avoid thread leak in configure (gh-143122)
If you are building with `--with-thread-sanitizer` and don't use the
suppression file, then running configure will report a thread leak.
Call `pthread_join()` to avoid the thread leak.
files:
M configure
M configure.ac
diff --git a/configure b/configure
index b1faeaf806a9c6..411bc1a23226e7 100755
--- a/configure
+++ b/configure
@@ -18190,6 +18190,7 @@ else case e in #(
if (pthread_attr_init(&attr)) return (-1);
if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
if (pthread_create(&id, &attr, foo, NULL)) return (-1);
+ if (pthread_join(id, NULL)) return (-1);
return (0);
}
_ACEOF
diff --git a/configure.ac b/configure.ac
index 043ec957f40894..9e63c8f6144c3d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4760,6 +4760,7 @@ if test "$posix_threads" = "yes"; then
if (pthread_attr_init(&attr)) return (-1);
if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
if (pthread_create(&id, &attr, foo, NULL)) return (-1);
+ if (pthread_join(id, NULL)) return (-1);
return (0);
}]])],
[ac_cv_pthread_system_supported=yes],
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]