Commit a25f0f2c by Jamie Madill Committed by Angle LUCI CQ

Suppress flaky TSAN TLS false positive.

Introduces "ANGLE_NO_SANITIZE_THREAD" which works the same way as "ANGLE_NO_SANITIZE_MEMORY". Bug: chromium:1223970 Change-Id: I9409771f7c4748bbc186da3fc38031d3b1d1e4d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2987875 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
parent 8513e538
......@@ -319,6 +319,13 @@ inline bool IsLittleEndian()
# define ANGLE_NO_SANITIZE_MEMORY
#endif
// Similar to the above, but for thread sanitization.
#ifdef __clang__
# define ANGLE_NO_SANITIZE_THREAD __attribute__((no_sanitize_thread))
#else
# define ANGLE_NO_SANITIZE_THREAD
#endif
// The below inlining code lifted from V8.
#if defined(__clang__) || (defined(__GNUC__) && defined(__has_attribute))
# define ANGLE_HAS_ATTRIBUTE_ALWAYS_INLINE (__has_attribute(always_inline))
......
......@@ -88,7 +88,8 @@ void SetGlobalLastContext(gl::Context *context)
}
// This function causes an MSAN false positive, which is muted. See https://crbug.com/1211047
ANGLE_NO_SANITIZE_MEMORY Thread *GetCurrentThread()
// It also causes a flaky false positive in TSAN. http://crbug.com/1223970
ANGLE_NO_SANITIZE_MEMORY ANGLE_NO_SANITIZE_THREAD Thread *GetCurrentThread()
{
Thread *current = gCurrentThread;
return (current ? current : AllocateCurrentThread());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment