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     "race:rtc_base/shared_exclusive_lock_unittest.cc\n"
35     "race:rtc_base/signal_thread_unittest.cc\n"
36 
37     // rtc_pc_unittests
38     // https://code.google.com/p/webrtc/issues/detail?id=2079
39     "race:rtc_base/test_client.cc\n"
40     "race:rtc_base/virtual_socket_server.cc\n"
41     "race:talk/p2p/base/stun_server_unittest.cc\n"
42 
43     // third_party/usrsctp
44     // TODO(jiayl): https://code.google.com/p/webrtc/issues/detail?id=3492
45     "race:user_sctp_timer_iterate\n"
46 
47     // https://code.google.com/p/webrtc/issues/detail?id=5151
48     "race:sctp_close\n"
49 
50     // Potential deadlocks detected after roll in r6516.
51     // https://code.google.com/p/webrtc/issues/detail?id=3509
52     "deadlock:webrtc::test::UdpSocketManagerPosixImpl::RemoveSocket\n"
53 
54     // TODO(pbos): Trace events are racy due to lack of proper POD atomics.
55     // https://code.google.com/p/webrtc/issues/detail?id=2497
56     "race:*trace_event_unique_catstatic*\n"
57 
58     // Race between InitCpuFlags and TestCpuFlag in libyuv.
59     // https://code.google.com/p/libyuv/issues/detail?id=508
60     "race:InitCpuFlags\n"
61 
62     // Test-only race due to PeerConnection::session() being virtual for
63     // testing. The stats collector may call session() before or after the
64     // destructor begins executing, which modifies the vtable.
65     "race:*RTCStatsIntegrationTest_GetsStatsWhileDestroyingPeerConnections_"
66     "Test::TestBody\n"
67 
68     // http://crbug.com/244856
69     "race:libpulsecommon*.so\n"
70 
71     // End of suppressions.
72     ;  // Please keep this semicolon.
73 
74 #endif  // THREAD_SANITIZER
75