Merge 2.55.2 into tizen
[platform/upstream/glib.git] / glib.supp
1 # GLib Valgrind suppressions file
2 #
3 # This provides a list of suppressions for all of GLib (including GIO), for all
4 # Valgrind tools (memcheck, drd, helgrind, etc.) for the false positives and
5 # deliberate one-time leaks which GLib causes to be reported when running under
6 # Valgrind.
7 #
8 # When running an application which links to GLib under Valgrind, you can pass
9 # this suppression file to Valgrind using --suppressions=/path/to/glib-2.0.supp.
10 #
11 # http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress
12 #
13 # Note that there is currently no way for Valgrind to load this automatically
14 # (https://bugs.kde.org/show_bug.cgi?id=160905), so the best GLib can currently
15 # do is to install this file as part of its development package.
16 #
17 # This file should be updated if GLib introduces a new deliberate one-time leak,
18 # or another false race positive in Valgrind: please file bugs at:
19 #
20 # https://bugzilla.gnome.org/enter_bug.cgi?product=glib
21
22 {
23         gnutls-init-calloc
24         Memcheck:Leak
25         fun:calloc
26         ...
27         fun:gtls_gnutls_init
28 }
29
30 {
31         gnutls-init-realloc
32         Memcheck:Leak
33         fun:realloc
34         ...
35         fun:gtls_gnutls_init
36 }
37
38 {
39         g-tls-backend-gnutls-init
40         Memcheck:Leak
41         fun:g_once_impl
42         fun:g_tls_backend_gnutls_init
43 }
44
45 {
46         p11-tokens-init
47         Memcheck:Leak
48         fun:calloc
49         ...
50         fun:create_tokens_inlock
51         fun:initialize_module_inlock_reentrant
52 }
53
54 {
55         gobject-init-malloc
56         Memcheck:Leak
57         fun:malloc
58         ...
59         fun:gobject_init_ctor
60 }
61
62 {
63         gobject-init-realloc
64         Memcheck:Leak
65         fun:realloc
66         ...
67         fun:gobject_init_ctor
68 }
69
70 {
71         gobject-init-calloc
72         Memcheck:Leak
73         fun:calloc
74         ...
75         fun:gobject_init_ctor
76 }
77
78 {
79         g-type-register-dynamic
80         Memcheck:Leak
81         fun:malloc
82         ...
83         fun:g_type_register_dynamic
84 }
85
86 {
87         g-type-register-static
88         Memcheck:Leak
89         fun:malloc
90         ...
91         fun:g_type_register_static
92 }
93
94 {
95         g-type-register-static-realloc
96         Memcheck:Leak
97         fun:realloc
98         ...
99         fun:g_type_register_static
100 }
101
102 {
103         g-type-register-static-calloc
104         Memcheck:Leak
105         fun:calloc
106         ...
107         fun:g_type_register_static
108 }
109
110 {
111         g-type-add-interface-dynamic
112         Memcheck:Leak
113         fun:malloc
114         ...
115         fun:g_type_add_interface_dynamic
116 }
117
118 {
119         g-type-add-interface-static
120         Memcheck:Leak
121         fun:malloc
122         ...
123         fun:g_type_add_interface_static
124 }
125
126 {
127         g-test-rand-init
128         Memcheck:Leak
129         fun:calloc
130         ...
131         fun:g_rand_new_with_seed_array
132         fun:test_run_seed
133         ...
134         fun:g_test_run
135 }
136
137 {
138         g-test-rand-init2
139         Memcheck:Leak
140         fun:calloc
141         ...
142         fun:g_rand_new_with_seed_array
143         ...
144         fun:get_global_random
145         ...
146         fun:g_test_init
147 }
148
149 {
150         g-quark-table-new
151         Memcheck:Leak
152         fun:g_hash_table_new
153         ...
154         fun:quark_new
155 }
156
157 {
158         g-quark-table-resize
159         Memcheck:Leak
160         fun:g_hash_table_resize
161         ...
162         fun:quark_new
163 }
164
165 {
166         g-type-interface-init
167         Memcheck:Leak
168         fun:malloc
169         ...
170         fun:type_iface_vtable_base_init_Wm
171 }
172
173 {
174         g-type-class-init
175         Memcheck:Leak
176         fun:calloc
177         ...
178         fun:type_class_init_Wm
179 }
180
181 {
182         g-io-module-default-singleton-malloc
183         Memcheck:Leak
184         fun:malloc
185         ...
186         fun:g_type_create_instance
187         ...
188         fun:_g_io_module_get_default
189 }
190
191 {
192         g-io-module-default-singleton-module
193         Memcheck:Leak
194         fun:calloc
195         ...
196         fun:g_module_open
197         ...
198         fun:_g_io_module_get_default
199 }
200
201 {
202         g-get-language-names
203         Memcheck:Leak
204         fun:malloc
205         ...
206         fun:g_get_language_names
207 }
208
209 {
210         g-static-mutex
211         Memcheck:Leak
212         fun:malloc
213         ...
214         fun:g_static_mutex_get_mutex_impl
215 }
216
217 {
218         g-system-thread-init
219         Memcheck:Leak
220         fun:calloc
221         ...
222         fun:g_system_thread_new
223 }
224
225 {
226         g-io-module-default-proxy-resolver-gnome
227         Memcheck:Leak
228         fun:calloc
229         ...
230         fun:g_proxy_resolver_gnome_init
231         ...
232         fun:_g_io_module_get_default
233 }
234
235 # memcheck checks that the third argument to ioctl() is a valid pointer, but
236 # some ioctls use that argument as an integer
237 {
238    ioctl-with-non-pointer-param
239    Memcheck:Param
240    ioctl(generic)
241    fun:ioctl
242    fun:btrfs_reflink_with_progress
243 }
244
245 {
246         g-private-get
247         drd:ConflictingAccess
248         fun:g_private_get
249 }
250 {
251         g-private-get-helgrind
252         Helgrind:Race
253         fun:g_private_get
254 }
255
256
257 {
258         g-private-set
259         drd:ConflictingAccess
260         fun:g_private_set
261 }
262 {
263         g-private-set-helgrind
264         Helgrind:Race
265         fun:g_private_set
266 }
267
268 {
269         g-type-construct-free
270         drd:ConflictingAccess
271         fun:g_type_free_instance
272 }
273 {
274         g-type-construct-free-helgrind
275         Helgrind:Race
276         fun:g_type_free_instance
277 }
278
279 {
280         g-variant-unref
281         drd:ConflictingAccess
282         fun:g_variant_unref
283 }
284 {
285         g-variant-unref-helgrind
286         Helgrind:Race
287         fun:g_variant_unref
288 }
289
290 {
291         g-unix-signals-main
292         drd:ConflictingAccess
293         fun:_g_main_create_unix_signal_watch
294 }
295 {
296         g-unix-signals-dispatch
297         drd:ConflictingAccess
298         ...
299         fun:dispatch_unix_signals*
300 }
301 {
302         g-unix-signals-dispatch-helgrind
303         Helgrind:Race
304         ...
305         fun:dispatch_unix_signals*
306 }
307 {
308         g-unix-signals-other
309         drd:ConflictingAccess
310         fun:g_unix_signal_watch*
311 }
312 {
313         g-unix-signals-other-helgrind
314         Helgrind:Race
315         fun:g_unix_signal_watch*
316 }
317 {
318         g-unix-signals-handler
319         drd:ConflictingAccess
320         fun:g_unix_signal_handler*
321 }
322 {
323         g-unix-signals-handler-helgrind
324         Helgrind:Race
325         fun:g_unix_signal_handler*
326 }
327 {
328         g-unix-signals-worker
329         drd:ConflictingAccess
330         fun:glib_worker_main
331 }
332 {
333         g-unix-signals-worker-helgrind
334         Helgrind:Race
335         fun:glib_worker_main
336 }
337
338 {
339         g-wakeup-acknowledge
340         drd:ConflictingAccess
341         fun:read
342         fun:g_wakeup_acknowledge
343 }
344
345 {
346         g-type-fundamental
347         drd:ConflictingAccess
348         fun:g_type_fundamental
349 }
350 {
351         g-type-fundamental-helgrind
352         Helgrind:Race
353         fun:g_type_fundamental
354 }
355 {
356         g-type-class-peek-static
357         drd:ConflictingAccess
358         fun:g_type_class_peek_static
359 }
360 {
361         g-type-class-peek-static-helgrind
362         Helgrind:Race
363         fun:g_type_class_peek_static
364 }
365 {
366         g-type-is-a
367         drd:ConflictingAccess
368         ...
369         fun:g_type_is_a
370 }
371 {
372         g-type-is-a-helgrind
373         Helgrind:Race
374         ...
375         fun:g_type_is_a
376 }
377
378 {
379         g-inet-address-get-type
380         drd:ConflictingAccess
381         fun:g_inet_address_get_type
382 }
383 {
384         g-inet-address-get-type-helgrind
385         Helgrind:Race
386         fun:g_inet_address_get_type
387 }
388
389 # From: https://github.com/fredericgermain/valgrind/blob/master/glibc-2.X-drd.supp
390 {
391         drd-libc-stdio
392         drd:ConflictingAccess
393         obj:*/lib*/libc-*
394 }
395 {
396         drd-libc-recv
397         drd:ConflictingAccess
398         fun:recv
399 }
400 {
401         drd-libc-send
402         drd:ConflictingAccess
403         fun:send
404 }
405
406 # GSources do an opportunistic ref count check
407 {
408         g-source-set-ready-time
409         drd:ConflictingAccess
410         fun:g_source_set_ready_time
411 }
412 {
413         g-source-set-ready-time-helgrind
414         Helgrind:Race
415         fun:g_source_set_ready_time
416 }
417
418 {
419         g-source-iter-next
420         Helgrind:Race
421         fun:g_source_iter_next
422         fun:g_main_context_*
423         fun:g_main_context_iterate
424 }
425
426 {
427         g-object-instance-private
428         drd:ConflictingAccess
429         fun:*_get_instance_private
430 }
431 {
432         g-object-instance-private-helgrind
433         Helgrind:Race
434         fun:*_get_instance_private
435 }
436
437 # GLib legitimately calls pthread_cond_signal without a mutex held
438 {
439         g-task-thread-complete
440         drd:CondErr
441         ...
442         fun:g_cond_signal
443         fun:g_task_thread_complete
444 }
445 {
446         g-task-thread-complete
447         Helgrind:Misc
448         ...
449         fun:g_cond_signal
450         fun:g_task_thread_complete
451 }
452
453 # False positive, but I can't explain how (FIXME)
454 {
455         g-task-cond
456         Helgrind:Misc
457         ...
458         fun:g_cond_clear
459         fun:g_task_finalize
460 }
461
462 # Real race, but is_cancelled() is an opportunistic function anyway
463 {
464         g-cancellable-is-cancelled
465         Helgrind:Race
466         fun:g_cancellable_is_cancelled
467 }
468
469 # False positive
470 {
471         g-main-context-cond
472         Helgrind:Misc
473         ...
474         fun:g_cond_clear
475         fun:g_main_context_unref
476 }
477
478 # False positives
479 {
480         g-source-unlocked
481         Helgrind:Race
482         fun:g_source_*_unlocked
483 }
484 {
485         g-source-internal
486         Helgrind:Race
487         fun:g_source_*_internal
488 }
489
490 # False positive
491 {
492         g_object_real_dispose
493         Helgrind:Race
494         fun:g_object_real_dispose
495 }
496
497 # False positive
498 {
499         g_object_new_valist
500         Helgrind:Race
501         ...
502         fun:g_object_new_valist
503 }