Skip to content

Commit 88f5b5e

Browse files
committed
gh-143121: Avoid thread leak in configure
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.
1 parent c2202a7 commit 88f5b5e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

configure

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4760,6 +4760,7 @@ if test "$posix_threads" = "yes"; then
47604760
if (pthread_attr_init(&attr)) return (-1);
47614761
if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
47624762
if (pthread_create(&id, &attr, foo, NULL)) return (-1);
4763+
if (pthread_join(id, NULL)) return (-1);
47634764
return (0);
47644765
}]])],
47654766
[ac_cv_pthread_system_supported=yes],

0 commit comments

Comments
 (0)