[Bug libstdc++/96817] __cxa_guard_acquire unsafe against dynamically loaded pthread
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Sep 25 18:11:05 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96817
--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Yuxuan Shui from comment #1)
> Example:
>
> This program normally deadlocks when using linked pthread:
>
> https://godbolt.org/z/Yrza4e
>
> But it will throw recursive_init_error when using dlopen'd pthread:
>
> https://godbolt.org/z/afMe5d
I'm not sure what these examples are very helpful. Throwing
recursive_init_error is the correct behaviour here, it's a bug that we fail to
detect the recursion when it happens in the same thread.
More information about the Gcc-bugs
mailing list