1#
2# Suppression patterns for ld, the dynamic loader.
3#
4
5# Suppress all data races triggered by ld.
6{
7   drd-ld
8   drd:ConflictingAccess
9   obj:/lib*/ld-*.so
10}
11
12#
13# Suppression patterns for libc.
14#
15
16# Suppress all data races where the topmost frame is inside libc.so. Although
17# this could hide some real data races, unfortunately this is the only way to
18# not report any false positives on stdio functions. The glibc functions
19# manipulating FILE objects use locking primitives that cannot be intercepted
20# easily. See also the definitions of _IO_lock_lock() etc. in the file
21# nptl/sysdeps/pthread/bits/stdio-lock.h in the glibc source tree.
22{
23   drd-libc-stdio
24   drd:ConflictingAccess
25   obj:/lib*/libc-*
26}
27{
28   drd-libc-thread-cancellation-test
29   drd:ConflictingAccess
30   fun:write
31}
32
33#
34# Suppression patterns for libstdc++, the implementation of the standard C++
35# library included with the gcc compiler.
36#
37# Note: several versions of the libstdc++ library (4.2.2, 4.3.2, 4.4.0, 4.5.0
38# and their predecessors) contain an implementation of the std::string class
39# that triggers conflicting memory accesses. See also
40# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40518
41#
42
43# {
44#    drd-libstdc++-std::string::string()
45#    drd:ConflictingAccess
46#    fun:_ZNSsC1ERKSs
47# }
48
49{
50   drd-libstdc++-cxa_guard_release
51   drd:CondErr
52   fun:pthread_cond_broadcast@*
53   fun:__cxa_guard_release
54}
55
56
57#
58# Suppression patterns for libpthread.
59#
60
61{
62   drd-libpthread-pthread_create
63   drd:ConflictingAccess
64   ...
65   fun:pthread_create*
66}
67{
68   drd-libpthread-pthread_join
69   drd:ConflictingAccess
70   fun:pthread_join
71   fun:pthread_join
72}
73{
74   drd-libpthread-__deallocate_stack
75   drd:ConflictingAccess
76   ...
77   fun:__deallocate_stack
78}
79{
80   drd-libpthread-__free_stacks
81   drd:ConflictingAccess
82   fun:__free_stacks
83}
84{
85   drd-libpthread-__free_tcb
86   drd:ConflictingAccess
87   ...
88   fun:__free_tcb
89}
90{
91   drd-libpthread-__nptl_deallocate_tsd
92   drd:ConflictingAccess
93   fun:__nptl_deallocate_tsd
94}
95{
96   drd-libpthread-pthread_detach
97   drd:ConflictingAccess
98   fun:pthread_detach
99   fun:pthread_detach
100}
101{
102   drd-libpthread-pthread_once
103   drd:ConflictingAccess
104   fun:pthread_once
105}
106{
107   drd-libpthread-pthread_cancel_init
108   drd:ConflictingAccess
109   fun:pthread_cancel_init
110}
111{
112   drd-libpthread-_Unwind_ForcedUnwind
113   drd:ConflictingAccess
114   ...
115   fun:_Unwind_ForcedUnwind
116}
117{
118   drd-libpthread-_Unwind_GetCFA
119   drd:ConflictingAccess
120   fun:_Unwind_GetCFA
121}
122{
123   drd-libpthread-_Unwind_Resume
124   drd:ConflictingAccess
125   ...
126   fun:_Unwind_Resume
127}
128{
129   drd-libpthread-?
130   drd:ConflictingAccess
131   obj:/lib/libgcc_s.so.1
132}
133{
134   drd-libpthread-nanosleep
135   drd:ConflictingAccess
136   fun:nanosleep
137}
138
139#
140# Suppression patterns for libgomp.
141#
142
143# Unfortunately many statements in libgomp trigger conflicting accesses. It is
144# not clear to me which of these are safe and which ones not. See also
145# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40362
146{
147   drd-libgomp
148   drd:ConflictingAccess
149   obj:/usr/lib*/libgomp.so*
150}
151
152#
153# Suppression patterns for libX11.
154#
155
156{
157   drd-libX11-XCreateFontSet
158   drd:CondErr
159   fun:pthread_cond_init*
160   fun:_XReply
161   fun:XListFontsWithInfo
162   obj:/usr/lib*/libX11.so*
163   fun:XCreateOC
164   fun:XCreateFontSet
165}
166
167#
168# Suppression patterns for libxcb.
169#
170
171{
172   drd-libxcb-xcb_wait_for_reply
173   drd:CondErr
174   fun:pthread_cond_destroy*
175   fun:xcb_wait_for_reply
176}
177
178#
179# Suppression patterns for libglib.
180#
181
182{
183   drd-libglib-access-g_threads_got_initialized
184   drd:ConflictingAccess
185   ...
186   fun:g_slice_alloc
187   fun:g_ptr_array_sized_new
188}
189{
190   drd-libglib-access-g_threads_got_initialized
191   drd:ConflictingAccess
192   ...
193   fun:_ZN27QEventDispatcherGlibPrivateC1EP13_GMainContext
194   fun:_ZN20QEventDispatcherGlibC1EP7QObject
195   obj:/usr/lib*/libQtCore.so.4.*
196   obj:/usr/lib*/libQtCore.so.4.*
197}
198{
199   drd-libglib-access-g_mem_initialized
200   drd:ConflictingAccess
201   fun:g_malloc0
202}
203{
204   drd-libglib-g_private_get_posix_impl
205   drd:ConflictingAccess
206   fun:g_private_get_posix_impl
207}
208{
209   drd-libglib-g_private_set_posix_impl
210   drd:ConflictingAccess
211   fun:g_private_set_posix_impl
212}
213{
214   drd-libglib-g_get_language_names
215   drd:ConflictingAccess
216   fun:g_slice_free_chain_with_offset
217}
218{
219   drd-libglib-g_main_context_new
220   drd:ConflictingAccess
221   fun:fcntl
222   obj:/usr/lib*/libglib-*.so*
223   fun:g_main_context_new
224}
225
226#
227# Suppression patterns for libQtCore.
228#
229
230{
231   drd-libQtCore-deref-that-calls-QThreadData-destructor
232   drd:ConflictingAccess
233   fun:_ZN11QThreadDataD1Ev
234   obj:/usr/lib*/libQtCore.so.4.*
235}
236{
237   drd-libQtCore-4.0/4.1-Q_GLOBAL_STATIC-connectionList
238   drd:ConflictingAccess
239   obj:/usr/lib*/libQtCore.so.4.*
240   fun:_ZN11QMetaObject8activateEP7QObjectiiPPv
241   fun:_ZN11QMetaObject8activateEP7QObjectPKS_iPPv
242}
243{
244   drd-libQtCore-QObjectPrivate::clearGuards(QObject*)
245   drd:ConflictingAccess
246   fun:_ZN14QReadWriteLock12lockForWriteEv
247   fun:_ZN14QObjectPrivate11clearGuardsEP7QObject
248   fun:_ZN7QObjectD2Ev
249}
250{
251   drd-libQtCore-QObjectPrivate::clearGuards(QObject*)
252   drd:ConflictingAccess
253   fun:_ZN14QReadWriteLock12lockForWriteEv
254   fun:_ZN12QWriteLocker6relockEv
255   fun:_ZN12QWriteLockerC1EP14QReadWriteLock
256   fun:_ZN14QObjectPrivate11clearGuardsEP7QObject
257   fun:_ZN7QObjectD2Ev
258   fun:_ZN24QAbstractEventDispatcherD2Ev
259   fun:_ZN20QEventDispatcherGlibD0Ev
260}
261{
262   drd-libQtCore-QMutexPool::get(void const*)
263   drd:ConflictingAccess
264   fun:_ZN10QMutexPool3getEPKv
265}
266{
267   drd-libQtCore-qt_gettime_is_monotonic()
268   drd:ConflictingAccess
269   fun:_Z23qt_gettime_is_monotonicv
270}
271
272#
273# Suppression patterns for libboost.
274#
275
276# Suppress the races on boost::once_flag::epoch and on
277# boost::detail::this_thread_epoch. See also the source file
278# boost/thread/pthread/once.hpp in the Boost source tree
279# (https://svn.boost.org/trac/boost/browser/trunk/boost/thread/pthread/once.hpp).
280{
281   drd-libboost-boost::call_once<void (*)()>(boost::once_flag&, void (*)())
282   drd:ConflictingAccess
283   ...
284   fun:_ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_
285}
286{
287   drd-libboost-boost::detail::get_once_per_thread_epoch()
288   drd:ConflictingAccess
289   fun:_ZN5boost6detail25get_once_per_thread_epochEv
290}
291# Suppress the race reports on boost::detail::current_thread_tls_key. See also
292# https://svn.boost.org/trac/boost/ticket/3526 for more information about why
293# the access pattern of current_thread_tls_key is safe.
294{
295   drd-libboost-boost::detail::get_current_thread_data()
296   drd:ConflictingAccess
297   ...
298   fun:_ZN5boost6detail23get_current_thread_dataEv
299}
300{
301   drd-libboost-boost::detail::set_current_thread_data(boost::detail::thread_data_base*)
302   drd:ConflictingAccess
303   ...
304   fun:_ZN5boost6detail23set_current_thread_dataEPNS0_16thread_data_baseE
305}
306