mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 11:27:15 +02:00
hardened TSan detection
This commit is contained in:
@ -89,6 +89,11 @@
|
|||||||
#define BOOST_UNORDERED_HAS_FEATURE(x) 0
|
#define BOOST_UNORDERED_HAS_FEATURE(x) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if BOOST_UNORDERED_HAS_FEATURE(thread_sanitizer)|| \
|
||||||
|
defined(__SANITIZE_THREAD__)
|
||||||
|
#define BOOST_UNORDERED_THREAD_SANITIZER
|
||||||
|
#endif
|
||||||
|
|
||||||
#define BOOST_UNORDERED_STATIC_ASSERT_HASH_PRED(Hash, Pred) \
|
#define BOOST_UNORDERED_STATIC_ASSERT_HASH_PRED(Hash, Pred) \
|
||||||
static_assert(boost::is_nothrow_swappable<Hash>::value, \
|
static_assert(boost::is_nothrow_swappable<Hash>::value, \
|
||||||
"Template parameter Hash is required to be nothrow Swappable."); \
|
"Template parameter Hash is required to be nothrow Swappable."); \
|
||||||
@ -273,7 +278,7 @@ private:
|
|||||||
|
|
||||||
inline __m128i load_si128()const
|
inline __m128i load_si128()const
|
||||||
{
|
{
|
||||||
#if BOOST_UNORDERED_HAS_FEATURE(thread_sanitizer)
|
#if defined(BOOST_UNORDERED_THREAD_SANITIZER)
|
||||||
/* ThreadSanitizer complains on 1-byte atomic writes combined with
|
/* ThreadSanitizer complains on 1-byte atomic writes combined with
|
||||||
* 16-byte atomic reads.
|
* 16-byte atomic reads.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user