1 2# FIXME 22 Jan 09: helgrind-glibc2X-005 overlaps with a lot of 3# other stuff. They should be removed. 4 5##----------------------------------------------------------------------## 6# Suppressions for the Helgrind tool when using 7# a glibc-2.{3,4,5,6,7,8,9} system 8 9#################################################### 10# glibc-2.X specific 11# These are generic cover-alls which catch a lot of stuff 12# in various combinations of ld, libc and libpthread 13# 14# Note this is heavyhanded and not very clever: 15# 16# - suppress anything that has its top frame in ld.so 17# That's fine, since it's mostly dynamic linking stuff, 18# which has various deliberate (harmless) races 19# 20# - suppress anything that has its top frame in libc.so. 21# This really isn't clever, since it could hide some 22# legitimate races. But the problem is, if we don't do 23# this, then loads of errors to do with stdio are reported, because 24# H fails to see glibc's internal locking/unlocking of FILE*s 25# as required by POSIX. A better solution is needed. 26# 27# - some of the stdio functions in newer glibc manipulate stdio 28# FILE*s state through mempcpy, which we intercept, so we also need 29# to suppress such manipulations. 30 31#{ 32# helgrind-glibc2X-001 33# Helgrind:Race 34# obj:*/lib*/ld-2.*so* 35#} 36 37# helgrind-glibc2X-002 was merged into helgrind-glibc2X-001 38 39# helgrind-glibc2X-003 was merged into helgrind-glibc2X-001 40 41{ 42 helgrind-glibc2X-004 43 Helgrind:Race 44 obj:*/lib*/libc-2.*so* 45} 46 47{ 48 helgrind-glibc-io-xsputn-mempcpy 49 Helgrind:Race 50 fun:__GI_mempcpy 51 fun:_IO_*xsputn* 52 obj:*/lib*/libc-2.*so* 53} 54 55{ 56 helgrind-glibc2X-005 57 Helgrind:Race 58 obj:*/lib*/libpthread-2.*so* 59} 60 61# helgrind-glibc2X-006 was merged into helgrind-glibc2X-005 62 63# helgrind-glibc2X-007 was merged into helgrind-glibc2X-001 64 65# helgrind-glibc2X-008 was merged into helgrind-glibc2X-004 66 67# helgrind-glibc2X-009 was merged into helgrind-glibc2X-004 68 69# helgrind-glibc2X-010 was merged into helgrind-glibc2X-001 70 71# helgrind-glibc2X-011 was merged into helgrind-glibc2X-004 72 73# helgrind-glibc2X-012 was merged into helgrind-glibc2X-001 74 75# helgrind-glibc2X-013 was merged into helgrind-glibc2X-001 76 77# helgrind-glibc2X-014 was merged into helgrind-glibc2X-001 78 79# helgrind-glibc2X-015 was merged into helgrind-glibc2X-004 80 81# helgrind-glibc2X-016 was merged into helgrind-glibc2X-004 82 83# These are very ugly. They are needed to suppress errors inside (eg) 84# NPTL's pthread_cond_signal. Why only one stack frame -- at least we 85# should see the wrapper calling the real functions, right? 86# Unfortunately, no: the real functions are handwritten assembly (in 87# the glibc-2.5 sources) and does not create a proper stack frame. 88# Therefore it's only one level of unwinding before we're back out in 89# user code rather than the 2 levels you'd expect. 90{ 91 helgrind-glibc2X-101 92 Helgrind:Race 93 obj:*/lib*/libpthread-2.*so* 94 fun:pthread_* 95} 96{ 97 helgrind-glibc2X-102 98 Helgrind:Race 99 fun:mythread_wrapper 100 obj:*/lib*/libpthread-2.*so* 101} 102{ 103 helgrind-glibc2X-103 104 Helgrind:Race 105 fun:pthread_cond_*@@GLIBC_2.* 106} 107{ 108 helgrind-glibc2X-104 109 Helgrind:Race 110 fun:__lll_mutex_* 111} 112{ 113 helgrind-glibc2X-105 114 Helgrind:Race 115 fun:pthread_rwlock_*lock* 116} 117{ 118 helgrind-glibc2X-106 119 Helgrind:Race 120 fun:__lll_lock_wait 121} 122{ 123 helgrind-glibc2X-107 124 Helgrind:Race 125 obj:*/lib*/libpthread-2.*so* 126 fun:sem_* 127} 128{ 129 helgrind-glibc2X-108 130 Helgrind:Race 131 fun:clone 132} 133{ 134 helgrind-glibc2X-109 135 Helgrind:Race 136 fun:start_thread 137} 138{ 139 helgrind-glibc2X-110 140 Helgrind:Race 141 obj:*/lib*/libc-2.*so* 142 fun:pthread_* 143} 144{ 145 helgrind-glibc2X-111 146 Helgrind:Race 147 fun:__lll_*lock_* 148} 149{ 150 helgrind-glibc2X-113 151 Helgrind:Race 152 fun:pthread_barrier_wait* 153} 154 155 156#################################################### 157# qt4 specific (GNU mangling) 158# 159{ 160 helgrind-qt4---QMutex::lock()-QMutex::lock() 161 Helgrind:Race 162 ... 163 fun:_ZN6QMutex4lockEv 164 fun:_ZN6QMutex4lockEv 165} 166 167{ 168 helgrind-qt4---QMutex::unlock()-QMutex::unlock() 169 Helgrind:Race 170 ... 171 fun:_ZN6QMutex6unlockEv 172 fun:_ZN6QMutex6unlockEv 173} 174 175{ 176 helgrind-qt4---pthread_setspecific-QThreadPrivate::start(void*) 177 Helgrind:Race 178 fun:pthread_setspecific 179 fun:_ZN14QThreadPrivate5startEPv 180} 181 182 183#################################################### 184# Other stuff. 185# 186# pthread_exit apparently calls some kind of unwind 187# mechanism - maybe to remove some number of frames 188# from the thread's stack, so as to get back to the 189# outermost frame for the thread? Anyway.. 190 191{ 192 helgrind---*Unwind*-...-pthread_exit 193 Helgrind:Race 194 fun:*Unwind* 195 ... 196 fun:pthread_exit 197} 198 199{ 200 helgrind---...-*Unwind*-*pthread_unwind* 201 Helgrind:Race 202 ... 203 fun:*Unwind* 204 fun:*pthread_unwind* 205} 206 207{ 208 helgrind---...-*Unwind*-*pthread_unwind* 209 Helgrind:Race 210 ... 211 fun:_Unwind* 212 ... 213 fun:_Unwind_Backtrace 214} 215 216 217 218 219#################################################### 220# To do with thread stack allocation and deallocation? 221# 222{ 223 helgrind---free_stacks-__deallocate_stack 224 Helgrind:Race 225 fun:free_stacks 226 fun:__deallocate_stack 227} 228 229{ 230 helgrind---__deallocate_stack-start_thread-clone 231 Helgrind:Race 232 fun:__deallocate_stack 233 fun:start_thread 234 fun:clone 235} 236 237 238#################################################### 239# To do with pthread_{set,get}specific 240# 241{ 242 helgrind---pthread_setspecific 243 Helgrind:Race 244 fun:pthread_setspecific 245} 246 247{ 248 helgrind---pthread_getspecific 249 Helgrind:Race 250 fun:pthread_getspecific 251} 252 253 254#################################################### 255# To do with dynamic linking 256# 257# helgrind---ld.so-...-dlsym was merged into helgrind-glibc2X-001 258 259{ 260 helgrind---_dl_allocate_tls 261 Helgrind:Race 262 fun:mempcpy 263 fun:_dl_allocate_tls_init 264 ... 265 fun:pthread_create@@GLIBC_2.2* 266 fun:pthread_create_WRK 267 fun:pthread_create@* 268} 269 270{ 271 helgrind---_dl_allocate_tls2 272 Helgrind:Race 273 fun:memcpy 274 fun:__mempcpy_inline 275 fun:_dl_allocate_tls_init 276 ... 277 fun:pthread_create@@GLIBC_2.2* 278 fun:pthread_create_WRK 279 fun:pthread_create@* 280} 281 282#################################################### 283# To do with GNU libgomp 284# 285{ 286 helgrind---libgomp43-1 287 Helgrind:Race 288 fun:gomp_ordered_sync 289} 290 291{ 292 helgrind---libgomp43-1 293 Helgrind:Race 294 fun:gomp_ordered_next 295} 296 297{ 298 helgrind---libgomp43-1 299 Helgrind:Race 300 fun:gomp_ordered_last 301} 302