Warning, /sdk/kde-dev-scripts/kde.supp is written in an unsupported language. File is not indexed.

0001 #
0002 # Some valgrind suppressions handy for ignoring stuff we don't care
0003 # about when valgrinding kde applications
0004 #
0005 # Library paths and versions from debian unstable, YMMV
0006 #
0007 
0008 #
0009 # ld.so errors
0010 #
0011 
0012 {
0013     strchr/decompose_rpath/_dl_map_object
0014     MemCheck:Cond
0015     fun:strchr
0016     fun:decompose_rpath
0017     fun:_dl_map_object
0018 }
0019 
0020 {
0021     strlen/libc/_dl_catch_error
0022     MemCheck:Cond
0023     fun:strlen
0024     fun:_dl_open
0025     obj:*libdl-2*.so
0026     fun:_dl_catch_error*
0027 }
0028 
0029 {
0030     addr8/dl_catch_error
0031     MemCheck:Addr8
0032     ...
0033     fun:_dl_catch_error*
0034 }
0035 
0036 {
0037     strchr/libc/_dl_catch_error
0038     MemCheck:Cond
0039     fun:strchr
0040     obj:*libc-2.2.?.so
0041     fun:_dl_catch_error
0042 }
0043 
0044 {
0045     strrchr/_dl_map_object_from_fd/_dl_map_object
0046     MemCheck:Cond
0047     fun:strrchr
0048     fun:_dl_map_object_from_fd
0049     fun:_dl_map_object
0050 }
0051 
0052 # Needed with /lib/ld-2.12.1.so
0053 {
0054    index/expand_dynamic_string_token/_dl_map_object
0055    Memcheck:Cond
0056    fun:index
0057    fun:expand_dynamic_string_token
0058    fun:_dl_map_object
0059 }
0060 
0061 {
0062    strlen/_dl_signal_cerror/_dl_lookup_symbol_internal
0063    Memcheck:Cond
0064    fun:strlen
0065    fun:_dl_signal_cerror
0066    fun:_dl_lookup_symbol_internal
0067    fun:*dlsym
0068 }
0069 
0070 #
0071 # X library errors
0072 #
0073 
0074 {
0075     libXft(Cond)
0076     MemCheck:Cond
0077     obj:/usr/X11R6/lib/libXft.so.1.1
0078     obj:/usr/X11R6/lib/libXft.so.1.1
0079 }
0080 
0081 {
0082    write(buf)/libc/libICE
0083    Memcheck:Param
0084    write(buf)
0085    fun:__GI___libc_write
0086    fun:_IceTransWrite
0087    fun:_IceWrite
0088    fun:IceFlush
0089 }
0090 
0091 {
0092    write(buf)/libc/libICE(nosymbols)
0093    Memcheck:Param
0094    write(buf)
0095    fun:__write_nocancel
0096    obj:/usr/lib*/libICE.so.*
0097    obj:/usr/lib*/libICE.so.*
0098 }
0099 
0100 {
0101    write(buf)/libc/libICE(variant)
0102    Memcheck:Param
0103    write(buf)
0104    obj:/lib/libpthread-*.so
0105    obj:/usr/lib/libICE.so.*
0106    fun:_IceWrite
0107    fun:IceFlush
0108 }
0109 
0110 {
0111    write(buf)/libc/libX11
0112    Memcheck:Param
0113    write(buf)
0114    fun:__GI___libc_write
0115    fun:_X11TransWrite
0116    fun:_XFlushInt
0117    fun:_XFlush
0118 }
0119 
0120 {
0121    write(buf)/libc/libX11
0122    Memcheck:Param
0123    write(buf)
0124    fun:__GI___libc_write
0125    fun:_X11TransWrite
0126    fun:_XFlushInt
0127    fun:_XReply
0128 }
0129 
0130 {
0131    writev(vector[...])
0132    Memcheck:Param
0133    writev(vector[...])
0134    fun:*writev
0135    obj:libX11.so.*
0136    fun:_X11TransWritev
0137    fun:_XSend
0138 }
0139 
0140 #
0141 # SSL errors
0142 #
0143 
0144 {
0145     various1/libcrypto
0146     Memcheck:Value4
0147     obj:*libcrypto.so.0.9.7
0148 }
0149 
0150 {
0151     various2/libcrypto
0152     Memcheck:Cond
0153     obj:*libcrypto.so.0.9.7
0154 }
0155 
0156 {
0157     ssl3_read_bytes1/libssl
0158     Memcheck:Cond
0159     fun:memcpy
0160     fun:ssl3_read_bytes
0161 }
0162 
0163 {
0164     ssl3_read_bytes2/libssl
0165     Memcheck:Cond
0166     fun:ssl3_read_bytes
0167 }
0168 
0169 {
0170     ssl3_get_message/libssl
0171     Memcheck:Cond
0172     fun:ssl3_get_message
0173 }
0174 
0175 # zlib-1.2.x uses uninitialised memory in some tricky way which
0176 # apparently is harmless (it must amount to a vectorised while-loop,
0177 # nothing else makes sense).  Fools Memcheck though.  See the mentioned
0178 # URL for details.
0179 
0180 # Valgrind has this in default.supp but only for deflate, not for uncompress/inflateInit2
0181 {
0182    zlib-1.2.x trickyness (1): See http://www.zlib.net/zlib_faq.html#faq36
0183    Memcheck:Cond
0184    obj:/*lib*/libz.so.1.2.*
0185    ...
0186    fun:inflateInit2*
0187 }
0188 
0189 # Qt uses the waitid syscall in strange ways, to detect forkfd support
0190 {
0191    sys_waitid from qtbase/src/3rdparty/forkfd/forkfd_linux.c
0192    Memcheck:Param
0193    waitid(infop)
0194    fun:syscall
0195    fun:_ZL10sys_waitidiiP9siginfo_tiP6rusage
0196 }
0197 
0198 # Leakcheck suppressions
0199 {
0200    dlopen_worker_malloc
0201    Memcheck:Leak
0202    fun:malloc
0203    ...
0204    fun:dl_open_worker
0205 }
0206 
0207 {
0208    dlopen_worker_calloc
0209    Memcheck:Leak
0210    fun:calloc
0211    ...
0212    fun:dl_open_worker
0213 }
0214 
0215 {
0216    fontconfig_init
0217    Memcheck:Leak
0218    ...
0219    fun:FcInit
0220 }
0221 
0222 # Helgrind suppressions
0223 # Most of them (apart from the first one) are probably real,
0224 # but they're deep inside Qt, and usually not what we want to see
0225 # when debugging a threading issue in a KDE application.
0226 {
0227    QMutex_qt4_unlock_false_race
0228    Helgrind:Race
0229    fun:_ZN6QMutex6unlockEv
0230 }
0231 {
0232    QMutex_qt4_lock_false_race
0233    Helgrind:Race
0234    fun:_ZN6QMutex4lockEv
0235 }
0236 {
0237    # Qt4 qmutex_p.h, see maximumSpinTime declared as "volatile qint64"...
0238    QMutex_lockInternal_real_race
0239    Helgrind:Race
0240    fun:_ZN6QMutex12lockInternalEv
0241 }
0242 {
0243    # (Qt5) QMutex::lock checks a bool that is set by the QMutex constructor.
0244    # To use a mutex from another thread, some synchronization must have happened
0245    # already, which propagated this non-atomic write. Helgrind doesn't catch that.
0246    QMutex_isRecursive_false_race
0247    Helgrind:Race
0248    fun:_ZL11isRecursiveP10QMutexData
0249    fun:_ZN6QMutex4lockEv
0250 }
0251 {
0252    # Qt5: helgrind doesn't understand the atomic-operation calls inside QMutex
0253    Qt5_lockInternal
0254    Helgrind:Race
0255    ...
0256    fun:_ZN11QBasicMutex12lockInternalEv
0257 }
0258 {
0259    # Qt5: helgrind doesn't understand the atomic-operation calls inside QMutex
0260    Qt5_unlockInternal
0261    Helgrind:Race
0262    ...
0263    fun:_ZN11QBasicMutex14unlockInternalEv
0264 }
0265 {
0266    # Qt5: helgrind doesn't understand the atomic-operation calls inside QMutex
0267    Qt5_QMutex_unlock
0268    Helgrind:Race
0269    ...
0270    fun:_ZN6QMutex6unlockEv
0271 }
0272 {
0273    # Qt5: helgrind doesn't understand the atomic-operation calls inside QMutex
0274    Qt5_QMutex_lock
0275    Helgrind:Race
0276    ...
0277    fun:_ZN6QMutex4lockEv
0278 }
0279 {
0280    # Qt5: helgrind doesn't understand the atomic-operation calls
0281    Qt5_release_refcount
0282    Helgrind:Race
0283    ...
0284    fun:_ZN9QtPrivate8RefCount3refEv
0285 }
0286 {
0287    # Qt5 in release mode
0288    Qt5_release_basicmutex_isrecursive
0289    Helgrind:Race
0290    fun:_ZN11QBasicMutex11isRecursiveEv
0291 }
0292 
0293 {
0294    # I don't really see a problem with fork+exit "exiting while still holding one mutex".
0295    # I think helgrind just doesn't notice that we forked before calling exit -> TODO: report hg bug
0296    Helgrind_Exit
0297    Helgrind:Misc
0298    fun:_Exit
0299 }
0300 {
0301    deallocate_stack
0302    Helgrind:Race
0303    fun:__deallocate_stack
0304    fun:start_thread
0305    fun:clone
0306 }
0307 {
0308    qt_thread_data_race
0309    Helgrind:Race
0310    fun:_ZL15set_thread_dataP11QThreadData
0311    fun:_ZN14QThreadPrivate5startEPv
0312 }
0313 {
0314    timerId_race_in_qt4
0315    Helgrind:Race
0316    fun:_ZN31QAbstractEventDispatcherPrivate14releaseTimerIdEi
0317 }
0318 {
0319    timerId_second_race_in_qt4
0320    Helgrind:Race
0321    fun:_ZN31QAbstractEventDispatcherPrivate15allocateTimerIdEv
0322 }
0323 {
0324    QPointer_race_in_qt4
0325    Helgrind:Race
0326    fun:_ZNK5QHashIP7QObjectPS1_E7isEmptyEv
0327    fun:_ZN11QMetaObject11removeGuardEPP7QObject
0328 }
0329 
0330 # Helgrind suppressions for atomic operations.
0331 # This is because helgrind/drd cannot tell that they are atomic operations, on x86. The machine code is exactly the same.
0332 {
0333    QBasicAtomicPointer
0334    Helgrind:Race
0335    # catch load*, store*, and the qt4 operators
0336    ...
0337    fun:_*QBasicAtomicPointer*
0338 }
0339 {
0340    QBasicAtomicInt
0341    Helgrind:Race
0342    # catch Int and Integer, load, loadAcquire, store, storeRelease, testAndSet*, etc.
0343    ...
0344    fun:_*QBasicAtomicInt*
0345 }
0346 {
0347    Qt_5_9_atomic_ops
0348    Helgrind:Race
0349    ...
0350    fun:loadAcquire
0351 }
0352 
0353 # Additional helgrind suppressions: these are actual atomic operations,
0354 # but if they conflict with a suppressed store(), helgrind will warn anyway -- https://bugs.kde.org/show_bug.cgi?id=317381
0355 {
0356    QBasicAtomicOps_fetchAndStore
0357    Helgrind:Race
0358    fun:_ZN15QBasicAtomicOps*fetchAndStore*
0359 }
0360 {
0361    QBasicAtomicOps_testAndSet
0362    Helgrind:Race
0363    fun:_ZN15QBasicAtomicOps*testAndSet*
0364 }
0365 {
0366    QBasicAtomicOps_ref
0367    Helgrind:Race
0368    fun:_ZN15QBasicAtomicOps*ref*
0369 }
0370 
0371 ## Same for DRD (tested with Qt5 only)
0372 {
0373    QBasicAtomic_load_drd
0374    drd:ConflictingAccess
0375    # catch load and loadAcquire
0376    fun:_ZNK19QBasicAtomic*load*
0377 }
0378 {
0379    QBasicAtomic_store_drd
0380    drd:ConflictingAccess
0381    # catch store and storeRelease
0382    fun:_ZN19QBasicAtomic*store*
0383 }
0384 {
0385    QBasicAtomicOps_fetchAndStore_drd
0386    drd:ConflictingAccess
0387    fun:_ZN15QBasicAtomicOps*fetchAndStore*
0388 }
0389 {
0390    QBasicAtomicOps_testAndSet_drd
0391    drd:ConflictingAccess
0392    fun:_ZN15QBasicAtomicOps*testAndSet*
0393 }
0394 
0395 # fixup QOrderedMutexLocker, see https://bugs.kde.org/show_bug.cgi?id=243232
0396 {
0397    QOrderedMutexLocker_relock_tryLock
0398    Helgrind:LockOrder
0399    fun:QMutex_tryLock_int_WRK
0400    fun:_ZN19QOrderedMutexLocker6relockEP6QMutexS1_
0401 }
0402 
0403 {
0404    QOrderedMutexLocker_relock_lock
0405    Helgrind:LockOrder
0406    fun:QMutex_lock_WRK
0407    fun:_ZN19QOrderedMutexLocker6relockEP6QMutexS1_
0408 }
0409 
0410 {
0411    QOrderedMutexLocker_relock2_tryLock
0412    Helgrind:LockOrder
0413    fun:QMutex_tryLock_int_WRK
0414    fun:_ZN19QOrderedMutexLocker6relockEv
0415 }
0416 {
0417    QOrderedMutexLocker_relock2_lock
0418    Helgrind:LockOrder
0419    fun:QMutex_lock_WRK
0420    fun:_ZN19QOrderedMutexLocker6relockEv
0421 }
0422 
0423 # glib event loop integration, alternatively use QT_NO_GLIB=1
0424 
0425 {
0426    glib_event_loop
0427    Helgrind:Race
0428    fun:g_private_get
0429    obj:/usr/lib/libglib-*
0430    fun:g_main_context_dispatch
0431    obj:/usr/lib/libglib-*
0432    fun:g_main_context_iteration
0433 }
0434 
0435 # C atomic operations
0436 
0437 {
0438    AO_store
0439    Helgrind:Race
0440    fun:AO_store
0441 }
0442 {
0443    AO_load
0444    Helgrind:Race
0445    fun:AO_load
0446 }
0447 {
0448    AO_compare_and_swap
0449    Helgrind:Race
0450    fun:AO_compare_and_swap
0451 }
0452 
0453 # C++ atomic operations
0454 
0455 {
0456    atomic_store
0457    Helgrind:Race
0458    fun:store
0459    fun:_ZN*St*atomic*
0460 }
0461 {
0462    atomic_load
0463    Helgrind:Race
0464    fun:load
0465    fun:_ZN*St*atomic*
0466 }