mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
GH-1500: Mark BasicThread::Done to be ignored by ThreadSanitizer
There's a known false positive with the atomic variables in this method that triggers a complaint from ThreadSanitizer. Marking it as ignored avoids the warning.
This commit is contained in:
parent
09229c58d7
commit
0c8a594d6f
2 changed files with 17 additions and 1 deletions
|
@ -191,7 +191,7 @@ protected:
|
|||
void Kill();
|
||||
|
||||
/** Called by child thread's launcher when it's done processing. */
|
||||
void Done();
|
||||
ZEEK_DISABLE_TSAN void Done();
|
||||
|
||||
private:
|
||||
// thread entry function.
|
||||
|
|
|
@ -272,3 +272,19 @@ extern const char* BRO_VERSION_FUNCTION();
|
|||
#define ZEEK_LSAN_DISABLE(x)
|
||||
#define ZEEK_LSAN_DISABLE_SCOPE(x)
|
||||
#endif
|
||||
|
||||
#if defined(__SANITIZE_THREAD__)
|
||||
#define ZEEK_TSAN
|
||||
#endif
|
||||
|
||||
#if defined(__has_feature)
|
||||
#if __has_feature(thread_sanitizer)
|
||||
#define ZEEK_TSAN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(ZEEK_TSAN)
|
||||
#define ZEEK_DISABLE_TSAN __attribute__((no_sanitize("thread")))
|
||||
#else
|
||||
#define ZEEK_DISABLE_TSAN
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue