https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96817
Bug ID: 96817 Summary: __cxa_guard_acquire unsafe against dynamically loaded pthread Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: yshuiv7 at gmail dot com Target Milestone: --- If pthread is loaded dynamically via dlopen() after libstdc++ is loaded, __gthread_active_p() would return wrong result, cause guard acquire to be thread unsafe. An example of this problem: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3199