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