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:
Sam Gross 2025-12-30 19:45:23 -05:00 committed by GitHub
parent 04899b8539
commit 469fe33edd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

1
configure generated vendored
View file

@ -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

View file

@ -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],