kde.supp 7.08 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
#
# Some valgrind suppressions handy for ignoring stuff we don't care
# about when valgrinding kde applications
#
# Library paths and versions from debian unstable, YMMV
#

#
# ld.so errors
#

{
    strchr/decompose_rpath/_dl_map_object
14
    MemCheck:Cond
15 16 17 18 19
    fun:strchr
    fun:decompose_rpath
    fun:_dl_map_object
}

20 21 22 23 24 25 26 27 28
{
    strlen/libc/_dl_catch_error
    MemCheck:Cond
    fun:strlen
    fun:_dl_open
    obj:*libdl-2*.so
    fun:_dl_catch_error*
}

29 30
{
    strchr/libc/_dl_catch_error
31
    MemCheck:Cond
32 33 34 35 36 37 38
    fun:strchr
    obj:*libc-2.2.?.so
    fun:_dl_catch_error
}

{
    strrchr/_dl_map_object_from_fd/_dl_map_object
39
    MemCheck:Cond
40 41 42 43 44
    fun:strrchr
    fun:_dl_map_object_from_fd
    fun:_dl_map_object
}

45 46 47 48 49 50 51 52 53
# Needed with /lib/ld-2.12.1.so
{
   index/expand_dynamic_string_token/_dl_map_object
   Memcheck:Cond
   fun:index
   fun:expand_dynamic_string_token
   fun:_dl_map_object
}

54 55 56 57 58 59
{
   strlen/_dl_signal_cerror/_dl_lookup_symbol_internal
   Memcheck:Cond
   fun:strlen
   fun:_dl_signal_cerror
   fun:_dl_lookup_symbol_internal
60
   fun:*dlsym
61 62
}

63 64 65 66 67 68
#
# X library errors
#

{
    libXft(Cond)
69
    MemCheck:Cond
70 71 72 73 74
    obj:/usr/X11R6/lib/libXft.so.1.1
    obj:/usr/X11R6/lib/libXft.so.1.1
}

{
75 76 77
   write(buf)/libc/libICE
   Memcheck:Param
   write(buf)
David Faure's avatar
David Faure committed
78 79
   fun:__GI___libc_write
   fun:_IceTransWrite
80 81
   fun:_IceWrite
   fun:IceFlush
82 83
}

84 85 86 87 88 89 90 91 92
{
   write(buf)/libc/libICE(nosymbols)
   Memcheck:Param
   write(buf)
   fun:__write_nocancel
   obj:/usr/lib*/libICE.so.*
   obj:/usr/lib*/libICE.so.*
}

93 94 95 96 97 98 99 100 101 102
{
   write(buf)/libc/libICE(variant)
   Memcheck:Param
   write(buf)
   obj:/lib/libpthread-*.so
   obj:/usr/lib/libICE.so.*
   fun:_IceWrite
   fun:IceFlush
}

103
{
David Faure's avatar
David Faure committed
104
   write(buf)/libc/libX11
105 106
   Memcheck:Param
   write(buf)
David Faure's avatar
David Faure committed
107 108 109 110
   fun:__GI___libc_write
   fun:_X11TransWrite
   fun:_XFlushInt
   fun:_XFlush
111 112 113
}

{
David Faure's avatar
David Faure committed
114
   write(buf)/libc/libX11
115 116
   Memcheck:Param
   write(buf)
David Faure's avatar
David Faure committed
117 118 119
   fun:__GI___libc_write
   fun:_X11TransWrite
   fun:_XFlushInt
120 121 122 123
   fun:_XReply
}

{
David Faure's avatar
David Faure committed
124
   writev(vector[...])
125 126
   Memcheck:Param
   writev(vector[...])
David Faure's avatar
David Faure committed
127 128 129
   fun:*writev
   obj:libX11.so.*
   fun:_X11TransWritev
130
   fun:_XSend
131
}
Till Gerken's avatar
Till Gerken committed
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166

#
# SSL errors
#

{
    various1/libcrypto
    Memcheck:Value4
    obj:*libcrypto.so.0.9.7
}

{
    various2/libcrypto
    Memcheck:Cond
    obj:*libcrypto.so.0.9.7
}

{
    ssl3_read_bytes1/libssl
    Memcheck:Cond
    fun:memcpy
    fun:ssl3_read_bytes
}

{
    ssl3_read_bytes2/libssl
    Memcheck:Cond
    fun:ssl3_read_bytes
}

{
    ssl3_get_message/libssl
    Memcheck:Cond
    fun:ssl3_get_message
}
167

168 169 170 171
# zlib-1.2.x uses uninitialised memory in some tricky way which
# apparently is harmless (it must amount to a vectorised while-loop,
# nothing else makes sense).  Fools Memcheck though.  See the mentioned
# URL for details.
172 173

# Valgrind has this in default.supp but only for deflate, not for uncompress/inflateInit2
174
{
175 176 177 178
   zlib-1.2.x trickyness (1): See http://www.zlib.net/zlib_faq.html#faq36
   Memcheck:Cond
   obj:/*lib*/libz.so.1.2.*
   ...
179
   fun:inflateInit2*
180 181
}

182 183 184 185 186 187 188 189
# Leakcheck suppressions
{
   dlopen_worker_malloc
   Memcheck:Leak
   fun:malloc
   ...
   fun:dl_open_worker
}
190

191 192 193 194 195 196 197
{
   dlopen_worker_calloc
   Memcheck:Leak
   fun:calloc
   ...
   fun:dl_open_worker
}
198

199 200 201 202 203 204 205
{
   fontconfig_init
   Memcheck:Leak
   ...
   fun:FcInit
}

206
# Helgrind suppressions
207 208 209
# Most of them (apart from the first one) are probably real,
# but they're deep inside Qt, and usually not what we want to see
# when debugging a threading issue in a KDE application.
210
{
211
   QMutex_qt4_unlock_false_race
212 213 214
   Helgrind:Race
   fun:_ZN6QMutex6unlockEv
}
215 216 217 218 219
{
   QMutex_qt4_lock_false_race
   Helgrind:Race
   fun:_ZN6QMutex4lockEv
}
220 221 222 223 224 225 226
{
   # Qt4 qmutex_p.h, see maximumSpinTime declared as "volatile qint64"...
   QMutex_lockInternal_real_race
   Helgrind:Race
   fun:_ZN6QMutex12lockInternalEv
}
{
227 228 229 230
   # (Qt5) QMutex::lock checks a bool that is set by the QMutex constructor.
   # To use a mutex from another thread, some synchronization must have happened
   # already, which propagated this non-atomic write. Helgrind doesn't catch that.
   QMutex_isRecursive_false_race
231
   Helgrind:Race
232
   fun:_ZL11isRecursiveP10QMutexData
David Faure's avatar
David Faure committed
233
   fun:_ZN6QMutex4lockEv
234
}
235
{
236 237
   # Qt5: helgrind doesn't understand the atomic-operation calls inside QMutex
   Qt5_lockInternal
238
   Helgrind:Race
239
   ...
240 241 242
   fun:_ZN11QBasicMutex12lockInternalEv
}
{
243 244
   # Qt5: helgrind doesn't understand the atomic-operation calls inside QMutex
   Qt5_unlockInternal
245
   Helgrind:Race
246
   ...
247 248 249
   fun:_ZN11QBasicMutex14unlockInternalEv
}
{
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
   # Qt5: helgrind doesn't understand the atomic-operation calls inside QMutex
   Qt5_QMutex_unlock
   Helgrind:Race
   ...
   fun:_ZN6QMutex6unlockEv
}
{
   # Qt5: helgrind doesn't understand the atomic-operation calls inside QMutex
   Qt5_QMutex_lock
   Helgrind:Race
   ...
   fun:_ZN6QMutex4lockEv
}
{
   # Qt5: helgrind doesn't understand the atomic-operation calls
265 266
   Qt5_release_refcount
   Helgrind:Race
267
   ...
268 269 270 271 272 273 274 275 276
   fun:_ZN9QtPrivate8RefCount3refEv
}
{
   # Qt5 in release mode
   Qt5_release_basicmutex_isrecursive
   Helgrind:Race
   fun:_ZN11QBasicMutex11isRecursiveEv
}

277 278 279 280 281 282 283
{
   # I don't really see a problem with fork+exit "exiting while still holding one mutex".
   # I think helgrind just doesn't notice that we forked before calling exit -> TODO: report hg bug
   Helgrind_Exit
   Helgrind:Misc
   fun:_Exit
}
284 285 286 287 288 289 290
{
   deallocate_stack
   Helgrind:Race
   fun:__deallocate_stack
   fun:start_thread
   fun:clone
}
291 292 293 294 295 296 297 298 299 300 301 302
{
   qt_thread_data_race
   Helgrind:Race
   fun:_ZL15set_thread_dataP11QThreadData
   fun:_ZN14QThreadPrivate5startEPv
}
{
   timerId_race_in_qt4
   Helgrind:Race
   fun:_ZN31QAbstractEventDispatcherPrivate14releaseTimerIdEi
}
{
303
   timerId_second_race_in_qt4
304 305 306 307 308 309 310 311 312 313
   Helgrind:Race
   fun:_ZN31QAbstractEventDispatcherPrivate15allocateTimerIdEv
}
{
   QPointer_race_in_qt4
   Helgrind:Race
   fun:_ZNK5QHashIP7QObjectPS1_E7isEmptyEv
   fun:_ZN11QMetaObject11removeGuardEPP7QObject
}

314
# Helgrind suppressions for atomic operations.
315
# This is because helgrind/drd cannot tell that they are atomic operations, on x86. The machine code is exactly the same.
316
{
317
   QBasicAtomicPointer
318
   Helgrind:Race
319
   # catch load*, store*, and the qt4 operators
320
   ...
321
   fun:_*QBasicAtomicPointer*
322 323
}
{
324
   QBasicAtomicInt
325
   Helgrind:Race
326
   # catch Int and Integer, load, loadAcquire, store, storeRelease, testAndSet*, etc.
327
   ...
328
   fun:_*QBasicAtomicInt*
329
}
330

331 332 333 334 335 336 337 338 339 340 341 342
# Additional helgrind suppressions: these are actual atomic operations,
# but if they conflict with a suppressed store(), helgrind will warn anyway -- https://bugs.kde.org/show_bug.cgi?id=317381
{
   QBasicAtomicOps_fetchAndStore
   Helgrind:Race
   fun:_ZN15QBasicAtomicOps*fetchAndStore*
}
{
   QBasicAtomicOps_testAndSet
   Helgrind:Race
   fun:_ZN15QBasicAtomicOps*testAndSet*
}
343 344 345 346 347
{
   QBasicAtomicOps_ref
   Helgrind:Race
   fun:_ZN15QBasicAtomicOps*ref*
}
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371

## Same for DRD (tested with Qt5 only)
{
   QBasicAtomic_load_drd
   drd:ConflictingAccess
   # catch load and loadAcquire
   fun:_ZNK19QBasicAtomic*load*
}
{
   QBasicAtomic_store_drd
   drd:ConflictingAccess
   # catch store and storeRelease
   fun:_ZN19QBasicAtomic*store*
}
{
   QBasicAtomicOps_fetchAndStore_drd
   drd:ConflictingAccess
   fun:_ZN15QBasicAtomicOps*fetchAndStore*
}
{
   QBasicAtomicOps_testAndSet_drd
   drd:ConflictingAccess
   fun:_ZN15QBasicAtomicOps*testAndSet*
}