-
Couldn't load subscription status.
- Fork 15k
Open
Labels
Description
fowarded from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122344.
GCC's libstdc++'s memory includes sanitize/tsan_interface.h if thread sanitizer is turned on BUT if you use memory in a modules to export anything, GCC 15+ errors out due to TU-local entities being in use:
error: 'template<class _Tp> std::_Sp_atomic< <template-parameter-1-1> >::_Atomic_count::~_Atomic_count()' exposes TU-local entity '__tsan_mutex_not_static' tsan_interface.h:50:23: note: '__tsan_mutex_not_static' declared with internal linkage 50 | static const unsigned __tsan_mutex_not_static = 1 << 8; That is __tsan_mutex_not_static is not modules friendly.
None of the following are:
// Mutex has static storage duration and no-op constructor and destructor. // This effectively makes tsan ignore destroy annotation. static const unsigned __tsan_mutex_linker_init = 1 << 0; // Mutex is write reentrant. static const unsigned __tsan_mutex_write_reentrant = 1 << 1; // Mutex is read reentrant. static const unsigned __tsan_mutex_read_reentrant = 1 << 2; // Mutex does not have static storage duration, and must not be used after // its destructor runs. The opposite of __tsan_mutex_linker_init. // If this flag is passed to __tsan_mutex_destroy, then the destruction // is ignored unless this flag was previously set on the mutex. static const unsigned __tsan_mutex_not_static = 1 << 8; These constants still are an issue:
| static const unsigned __tsan_mutex_not_static = 1 << 8; |