forked from fmoessbauer/drace
-
Notifications
You must be signed in to change notification settings - Fork 4
/
drace.ini
226 lines (188 loc) · 6.74 KB
/
drace.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
; DRace, a dynamic data race detector
;
; Copyright (c) Siemens AG, 2018
;
; Authors:
; Felix Moessbauer <[email protected]>
;
; This work is licensed under the terms of the MIT license. See
; the LICENSE file in the top-level directory.
;
; SPDX-License-Identifier: MIT
;
; NOTE: exclude modules are given as regex, therefore escape a . with [.], if you don't
; want to match any character
; function names for windows
[sync]
; exclusive mutex lock
; Winbase.h;
acquire_excl=GlobalLock ; Lock on a memory location, TODO: Validate
release_excl=GlobalUnlock
; Internal implementation of C++ Mutexes on windows
; TODO: Validate
acquire_excl=_Mtx_lock
acquire_excl_try=_Mtx_trylock
release_excl=_Mtx_unlock
; Synchapi.h
wait_for_single_object=waitForSingleObject
wait_for_single_object=waitForSingleObjectEx
wait_for_multiple_objects=waitForMultipleObjects
wait_for_multiple_objects=waitForMultipleObjectsEx
; The Msg variants currently deadlock
wait_for_multiple_objects=MsgWaitForMultipleObjects
wait_for_multiple_objects=MsgWaitForMultipleObjectsEx
release_excl=ReleaseMutex
acquire_rec=EnterCriticalSection
acquire_rec_try=TryEnterCriticalSection
release_rec=LeaveCriticalSection
acquire_excl=AcquireSRWLockExclusive ; Slim Reader/Writer Locks Exclusive Mode
acquire_excl_try=TryAcquireSRWLockShared
release_excl=ReleaseSRWLockExclusive ; exclusive mutex unlock
acquire_shared=AcquireSRWLockShared ; Reader/Writer lock
acquire_shared_try=TryAcquireSRWLockExclusive
release_shared=ReleaseSRWLockShared ; Reader/Writer lock
; drace_annotation.h
happens_before=__drace_happens_before
happens_after=__drace_happens_after
[stdsync]
acquire_excl=std::mutex::lock
acquire_excl_try=std::mutex::try_lock
release_excl=std::mutex::unlock
acquire_excl=WaitOne
release_excl=ReleaseMutex
[qtsync]
; Qt Mutexes
;acquire_excl=QMutex::lock
;acquire_excl_try=QMutex::tryLock
;acquire_excl_try=QMutex::try_lock
;acquire_excl_try=QMutex::try_lock_for
;acquire_excl_try=QMutex::try_lock_until
;
;; RW locks in W Mode
;acquire_excl=QReadWriteLock::lockForWrite
;acquire_excl_try=QReadWriteLock::tryLockForWrite
;
;acquire_shared=QReadWriteLock::lockForRead
;acquire_shared_try=QReadWriteLock::tryLockForRead
;
;
;release_excl=QMutex::unlock
;release_excl=QReadWriteLock::unlock
[linuxsync]
acquire_excl=pthread_mutex_lock
acquire_excl_try=pthread_mutex_trylock
release_excl=pthread_mutex_unlock
; shared mutexes
;acquire_excl=pthread_rwlock_wrlock
;acquire_excl_try=pthread_rwlock_trywrlock
;release_excl=pthread_rwlock_unlock
;acquire_shared=pthread_rwlock_rdlock
;acquire_shared_try=pthread_rwlock_tryrdlock
[functions]
allocators=HeapAlloc
reallocators=HeapReAlloc
deallocators=HeapFree
threadstart=CreateThread
threadstart=_beginthread
threadstart=_beginthreadex
; annotated excludes
exclude_enter=__drace_enter_exclude
exclude_leave=__drace_leave_exclude
exclude=_chkstk
exclude=o__initialize_onexit_table
# initialization of static members, see
# https://www.variadic.xyz/2017/06/20/cpp11-threadsafe-statics/
exclude=_Init_thread_header
exclude=_Init_thread_footer
# exclude the addr of the first argument
exclude_argaddr=__drace_exclude_addr
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;; QT STUFF ;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; exclude all QT mutexes as they are more "high-level" than native mutexes
; This means that no races inside the mutex functions are reported.
; The mutex events itself are not affected
;exclude=QMutex::*
;exclude=QReadWriteLock::*
;
;; Locking between processes, assume implementation is race-free
;exclude=QLockFile::*
;
;exclude=QSemaphore* ; Assume that this is well-tested and race-free
;exclude=QCoreApplication::postEvent ; Qt Events
;exclude=QElapsedTimer ; Qt timer
;
;;exclude=RTNGStopTimer ; Do not exclude this, as it might break timer
;exclude=Allocator::alloc ; Custom allocator TODO: Add support for custom alloc
;exclude=Allocator::dealloc ; Custom allocator TODO: Add support for custom alloc
;exclude=SimpleStorage::resizeStorage ; Custom allocator
;exclude=SimpleStorage::clearStorage ; Custom allocator
;
;exclude=*Var::clone ; Cloning of variables, TODO: validate @Matous
[dotnetsync_monitor]
; coreclr 2.0
monitor_enter=JIT_MonEnterWorker_InlineGetThread
monitor_exit=JIT_MonExit
; coreclr >= 2.1
; Monitor
monitor_enter=JIT_MonReliableEnter_Portable
monitor_exit=JIT_MonExit_Portable
; MethodImplOptions.Synchronized
monitor_enter=JIT_MonEnterWorker_Portable
monitor_exit=JIT_MonExitWorker_Portable
[dotnetsync_rwlock]
acquire_excl=System.Threading.ReaderWriterLock*.EnterWriteLock*
acquire_excl_try=System.Threading.ReaderWriterLock*.TryEnterWriteLock(TimeoutTracker)*
acquire_shared=System.Threading.ReaderWriterLock*.EnterReadLock*
acquire_shared_try=System.Threading.ReaderWriterLock*.TryEnterReadLock(TimeoutTracker)*
acquire_upgrade=System.Threading.ReaderWriterLock*.EnterUpgradeableReadLock*
acquire_upgrade_try=System.Threading.ReaderWriterLock*.TryEnterUpgradeableReadLock(TimeoutTracker)*
release_excl=System.Threading.ReaderWriterLock*.ExitWriteLock*
release_shared=System.Threading.ReaderWriterLock*.ExitReadLock*
release_shared=System.Threading.ReaderWriterLock*.ExitUpgradeableReadLock*
[dotnetsync_barrier]
wait_blocking=System.Threading.Barrier.SignalAndWait()*
wait_nonblocking=System.Threading.Barrier.SignalAndWait*
[dotnetexclude]
exclude=System.Console.Write* ; Console is synchronized
exclude=System.Threading.WaitHandle.WaitOne*
;exclude=MetaDataGetDispenser
;exclude=DestroyThread
;exclude=GetCurrentThreadTypeNT5
;exclude=ThreadSuspend::UnlockThreadStore
;exclude=SString::Resize
;exclude=TableFreeSingleHandleToCache
;
;; locks are propagated to system, only disable analysis in these functions
;exclude=DeadlockAwareLock::TryBeginEnterLock
;exclude=ListLockEntry::FinishDeadlockAwareEnter
[modules]
; exclude modules must be given as regexes, to escape . write [.]
; otherwise . means any character -> "any.expression" matches also "anyxexpression"
exclude_mods=ucrtbase[.]dll
exclude_mods=tmmon64[.]dll
exclude_mods=ntdll[.]dll
exclude_mods=MSVCP140[.]dll
exclude_mods=TmUmEvt64[.]dll
exclude_mods=KERNELBASE[.]dll
exclude_mods=ADVAPI32[.]dll
exclude_mods=msvcrt[.]dll
exclude_mods=compbase[.]dll
; Linux
; exclude_mods=libc.*
; .NET
exclude_mods=CLRJIT[.]dll
exclude_mods=System[.]Private[.]CoreLib[.]dll
exclude_mods=System[.]Console[.]dll
exclude_mods=System[.]Threading[.]Thread[.]dll
; temporary excludes
exclude_mods=libWCCILmanager[.]dll ; ManagerTimedFunction::isStoping
exclude_mods=RTNGFoundation[.]dll ; Timer stuff that cannot be excluded otherwise
exclude_mods=clr[.]dll
exclude_mods=coreclr[.]dll
exclude_mods=CLRJIT[.]dll
exclude_mods=hostpolicy[.]dll
exclude_mods=hostfxr[.]dll
exclude_path=c:\windows\system32
exclude_path=c:\windows\microsoft.net
exclude_path=c:\windows\winsxs