mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
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.
This commit is contained in:
parent
04899b8539
commit
469fe33edd
2 changed files with 2 additions and 0 deletions
1
configure
generated
vendored
1
configure
generated
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue