xref: /aosp_15_r20/external/webrtc/tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
2  *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 // This file contains the WebRTC suppressions for ThreadSanitizer.
12 // Please refer to
13 // http://dev.chromium.org/developers/testing/threadsanitizer-tsan-v2
14 // for more info.
15 
16 #if defined(THREAD_SANITIZER)
17 
18 // Please make sure the code below declares a single string variable
19 // kTSanDefaultSuppressions contains TSan suppressions delimited by newlines.
20 // See http://dev.chromium.org/developers/testing/threadsanitizer-tsan-v2
21 // for the instructions on writing suppressions.
22 char kTSanDefaultSuppressions[] =
23 
24     // WebRTC specific suppressions.
25 
26     // Split up suppressions covered previously by thread.cc and
27     // messagequeue.cc.
28     "race:vp8cx_remove_encoder_threads\n"
29     "race:third_party/libvpx/source/libvpx/vp9/common/vp9_scan.h\n"
30 
31     // rtc_unittests
32     // https://code.google.com/p/webrtc/issues/detail?id=2080
33     "race:rtc_base/logging.cc\n"
34 
35     // Potential deadlocks detected after roll in r6516.
36     // https://code.google.com/p/webrtc/issues/detail?id=3509
37     "deadlock:webrtc::test::UdpSocketManagerPosixImpl::RemoveSocket\n"
38 
39     // TODO(pbos): Trace events are racy due to lack of proper POD atomics.
40     // https://code.google.com/p/webrtc/issues/detail?id=2497
41     "race:*trace_event_unique_catstatic*\n"
42 
43     // Race between InitCpuFlags and TestCpuFlag in libyuv.
44     // https://code.google.com/p/libyuv/issues/detail?id=508
45     "race:InitCpuFlags\n"
46 
47     // Test-only race due to PeerConnection::session() being virtual for
48     // testing. The stats collector may call session() before or after the
49     // destructor begins executing, which modifies the vtable.
50     "race:*RTCStatsIntegrationTest_GetsStatsWhileDestroyingPeerConnections_"
51     "Test::TestBody\n"
52 
53     // http://crbug.com/244856
54     "race:libpulsecommon*.so\n"
55 
56     // https://crbug.com/1158622
57     "race:absl::synchronization_internal::Waiter::Post\n"
58 
59     // End of suppressions.
60     ;  // Please keep this semicolon.
61 
62 #endif  // THREAD_SANITIZER
63