Skip to content

Commit 6679181

Browse files
committed
tsan: update suppressions
1 parent 5c1848e commit 6679181

File tree

1 file changed

+222
-104
lines changed

1 file changed

+222
-104
lines changed

suppressions/tsan.supp

Lines changed: 222 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,242 @@
1+
## The suppressions below match only the top frame of report stacks
2+
3+
# using thread-local regions in generate functions is fine
4+
race_top:vips_*_gen
5+
6+
# these helpers are used by the above generate functions
7+
race_top:make_firstlast
8+
race_top:reduce_sum
9+
race_top:vips_combine_pixels3
10+
race_top:vips_composite_base_select
11+
race_top:vips_convi_uchar_hwy
12+
race_top:vips_embed_base_find_edge
13+
race_top:vips_embed_base_paint_edge
14+
race_top:vips_rect_includesrect
15+
race_top:vips_rect_intersectrect
16+
race_top:vips_reduceh_uchar_hwy
17+
race_top:vips_reducev_uchar_hwy
18+
19+
# unlocked access to image/region fields, which is fine
20+
race_top:buffer_move
21+
race_top:vips_image_iskilled
22+
race_top:vips_region_buffer
23+
race_top:vips_region_copy
24+
race_top:vips_region_image
25+
race_top:vips_region_prepare
26+
race_top:vips_buffer_unref_ref
27+
race_top:vips__image_copy_fields_array
28+
race_top:vips__region_check_ownership
29+
30+
# unlocked access/assignment to ->read_position, which is fine
31+
race_top:vips_source_read
32+
race_top:vips_source_seek
33+
134
# an unlocked FALSE/TRUE assignment, which is fine
2-
race:vips_region_prepare_to
3-
race:render_kill
4-
race:render_reschedule
35+
race_top:vips_image_set_kill
36+
race_top:vips_object_set_property
37+
race_top:vips_region_region
38+
race_top:vips_source_decode
39+
race_top:vips_source_rewind
40+
race_top:vips__demand_hint_array
541

642
# an unlocked NULL assignment, which is fine
7-
race:render_thread
43+
race_top:vips_image_pio_input
44+
race_top:vips_image_wio_input
45+
46+
# an unlocked increment of ->local_memory, which is fine
47+
race_top:vips_malloc
848

9-
# unlocked read of pixels-processed-so-far, which is fine
10-
race:vips_sink_base_progress
11-
race:wbuffer_allocate_fn
12-
race:sink_memory_area_allocate_fn
49+
# buffers are thread-local (held in a GPrivate), so non-racy
50+
race_top:vips_buffer_free
51+
race_top:vips_buffer_undone
1352

14-
# use of *stop from generate funcs is unlocked, but fine
15-
race:vips_threadpool_run
53+
# local static variables ought to be non-racy
54+
race_top:vips_getpagesize
1655

1756
# guarded with vips_tracked_mutex, so it should be fine
18-
race:vips_tracked_mem
19-
race:vips_tracked_allocs
20-
race:vips_tracked_files
57+
race_top:vips_tracked_aligned_alloc
58+
race_top:vips_tracked_aligned_free
59+
race_top:vips_tracked_get_mem
60+
race_top:vips_tracked_malloc
61+
race_top:vips_tracked_open
2162

22-
# guarded with set->lock, so it should be fine
23-
race:vips_threadset_work
24-
race:vips_threadset_add
63+
# guarded with vips__meta_lock, so it should be fine
64+
race_top:meta_init
65+
race_top:meta_new
2566

26-
# guarded with vips_cache_lock, so it should be fine
27-
race:vips_cache_table
28-
race:vips_cache_drop_all
29-
race:vips_cache_get_first
30-
race:vips_cache_get_lru_cb
31-
race:vips_cache_remove
32-
race:vips_cache_trim
67+
# guarded with g_async_queue_lock(), so it should be fine
68+
race_top:vips_threadset_add_thread
69+
race_top:vips_threadset_reuse_wait
70+
71+
# task is popped from the queue locked, then executed and freed
72+
# unlocked, which is fine
73+
race_top:vips_threadset_work
3374

3475
# guarded with vips__global_lock, so it should be fine
35-
race:vips_error_freeze_count
36-
race:vips__link_make
37-
race:vips__link_map
38-
race:vips__link_break_all
39-
race:tile_name
40-
race:vips_image_sanity
76+
race_top:vips_area_new
77+
race_top:vips_buf_vappendf
78+
race_top:vips_image_sanity
79+
race_top:vips__link_make
80+
race_top:vips__link_map
81+
race_top:vips__region_count_pixels
4182

42-
# guarded with vips_text_lock, so it should be fine
43-
race:vips_text_build
83+
# guarded with vips_cache_lock, so it should be fine
84+
race_top:vips_cache_drop_all
85+
race_top:vips_cache_get_lru
86+
race_top:vips_entry_ref
87+
race_top:vips_entry_touch
88+
race_top:vips_operation_hash
89+
90+
# use of pool->stop is unlocked, but fine
91+
race_top:vips_thread_main_loop
92+
93+
# quarks (i.e. GQuark) are likely non-racy
94+
race_top:vips_reorder_free
95+
race_top:vips_reorder_prepare_many
96+
race_top:vips__reorder_set_input
97+
98+
# attaching/updating the time struct of an image is likely safe
99+
race_top:vips_progress_add
100+
race_top:vips_progress_update
101+
102+
# semaphores are likely non-racy
103+
race_top:vips_*semaphore_*
104+
105+
# pool->exit is atomically updated, so it should be fine
106+
race_top:vips_worker_work_unit
107+
108+
# guarded with area->lock, so it should be fine
109+
race_top:vips_area_copy
110+
race_top:vips_area_free
111+
race_top:vips_area_unref
112+
113+
# guarded with cache->lock, so it should be fine
114+
race_top:vips_rect_equal
115+
race_top:vips_rect_hash
116+
race_top:vips_tile_cache_ref
117+
race_top:vips_tile_find
118+
race_top:vips_tile_new
119+
race_top:vips_tile_ref
120+
race_top:vips_tile_search
44121

45-
# the double-buffered output and write-behind thread are non-racy
46-
race:wbuffer_new
47-
race:wbuffer_write
48-
race:wbuffer_work_fn
49-
race:wbuffer_free
50-
race:write_thread_state_new
122+
# guarded with pool->allocate_lock, so it should be fine
123+
race_top:direct_strip_allocate
124+
race_top:image_strip_allocate
125+
race_top:sink_area_allocate_fn
126+
race_top:sink_area_position
127+
race_top:sink_memory_area_allocate_fn
128+
race_top:sink_memory_area_position
129+
race_top:vips_maplut_stop
130+
race_top:vips_worker_allocate
131+
race_top:wbuffer_allocate_fn
132+
race_top:wtiff_layer_row_allocate
133+
134+
# thread-local state work functions are non-racy
135+
race_top:sink_memory_area_work_fn
136+
race_top:sink_work
137+
race_top:wbuffer_work_fn
51138

52-
# thread-local variables (i.e. GPrivate) are harmless
53-
race:vips_thread_profile_key
54-
race:buffer_thread_key
139+
# guarded with image->sslock, so it should be fine
140+
race_top:rtiff_seq_start
141+
race_top:vips_arithmetic_start
142+
race_top:vips_bandary_start
143+
race_top:vips_composite_start
144+
race_top:vips_convf_start
145+
race_top:vips_convi_start
146+
race_top:vips_foreign_load_start
147+
race_top:vips_foreign_load_temp
148+
race_top:vips_hist_local_start
149+
race_top:vips_morph_start
150+
race_top:vips_rank_start
151+
race_top:vips_region_build
152+
race_top:vips_region_dispose
153+
race_top:vips_shrinkv_start
154+
race_top:vips_start_many
155+
race_top:vips_window_find
156+
race_top:vips_window_fits
157+
race_top:vips_window_new
158+
race_top:vips_window_set
159+
race_top:vips_window_take
160+
race_top:vips_window_unref
161+
race_top:vips__region_start
162+
race_top:vips__region_stop
163+
race_top:vips__start_merge
164+
165+
## The suppressions below match all frames of report stacks
166+
167+
# foreign generate functions ought to be non-racy
168+
race:direct_strip_work
169+
race:image_strip_work
170+
race:png2vips_generate
171+
race:rad2vips_generate
172+
race:read_jpeg_generate
173+
race:read_webp_generate
174+
race:rtiff_fill_region
175+
race:rtiff_stripwise_generate
176+
race:vips_fits_generate
177+
race:vips_foreign_load_heif_generate
178+
race:vips_foreign_load_jp2k_generate_tiled
179+
race:vips_foreign_load_jp2k_generate_untiled
180+
race:vips_foreign_load_jxl_generate
181+
race:vips_foreign_load_magick7_fill_region
182+
race:vips_foreign_load_magick_fill_region
183+
race:vips_foreign_load_nsgif_generate
184+
race:vips_foreign_load_pdf_generate
185+
race:vips_foreign_load_png_generate
186+
race:vips_foreign_load_ppm_generate_1bit_ascii
187+
race:vips_foreign_load_ppm_generate_1bit_binary
188+
race:vips_foreign_load_ppm_generate_ascii_int
189+
race:vips_foreign_load_ppm_generate_binary
190+
race:vips_foreign_load_svg_generate
191+
race:vips__openexr_generate
192+
race:vips__openslide_generate
193+
race:wtiff_layer_row_work
194+
195+
# use of client data in callback functions is unlocked, but fine
196+
race:readjpeg_emit_message
197+
race:source_fill_input_buffer
198+
race:source_fill_input_buffer_mappable
199+
race:vips_foreign_load_heif_read
200+
race:vips_foreign_load_heif_wait_for_file_size
201+
race:vips_foreign_load_jp2k_seek_source
202+
race:vips_foreign_load_png_stream
203+
race:vips_png_read_source
204+
205+
# using thread-local regions in generate functions is fine
206+
# this also catches all ->correlation, ->point, ->process_line and
207+
# ->scan subclass functions
208+
race:vips_arithmetic_gen
209+
race:vips_bandary_gen
210+
race:vips_colour_gen
211+
race:vips_correlation_gen
212+
race:vips_statistic_scan
213+
race:vips_point_gen
214+
race:vips_sdf_gen
215+
216+
# guarded with vips__minimise_lock, so it should be fine
217+
race:vips_image_minimise_all
55218

56-
# glib signals are probably non-racy
57-
race:vips_image_preeval
58-
race:vips_image_eval
59-
race:vips_image_posteval
60-
race:vips_image_written
61-
race:vips_image_real_written
62-
race:vips_image_save_cb
63-
race:render_close_cb
64-
race:readjpeg_close_cb
219+
# guarded with vips_cache_lock, so it should be fine
220+
race:vips_cache_free_cb
65221

66-
# semaphores are probably non-racy
67-
race:vips_semaphore_*
222+
# finalize() is only called once by a single thread, so non-racy
223+
race:vips_image_finalize
68224

69-
# guarded with pool->allocate_lock, so it should be fine
70-
race:vips_worker_work_unit
71-
race:sink_call_start
72-
race:sink_call_stop
73-
race:vips_hist_find_start
74-
race:vips_hist_find_indexed_start
75-
race:vips_hist_find_stop
76-
race:vips_hough_new_accumulator
77-
race:vips_statistic_scan_start
78-
race:vips_statistic_scan_stop
79-
race:vips_max_stop
80-
race:vips_values_add
81-
race:vips_deviate_stop
82-
race:vips_arithmetic_start
83-
race:histogram_new
84-
85-
# per-thread state allocate/dispose functions are non-racy
86-
race:sink_thread_state_class_init
87-
race:vips_thread_state_init
88-
race:vips_thread_state_build
89-
race:vips_thread_state_set
90-
race:vips_thread_state_dispose
91-
race:write_thread_state_new
92-
race:vips_sink_base_init
93-
race:vips_sink_thread_state_new
94-
race:sink_memory_init
225+
# only called optionally when the whole program is done, so non-racy
226+
race:vips_shutdown
227+
228+
# dispose() may run multiple times, but always serially, so non-racy
229+
race:vips_image_dispose
230+
231+
# thread-local state allocate/dispose functions ought to be non-racy
95232
race:sink_memory_thread_state_new
96-
race:sink_memory_free
97-
race:sink_thread_state_build
98233
race:sink_thread_state_dispose
99-
race:buffer_cache_free
100-
race:sink_init
101-
race:sink_free
102-
race:vips_sequential_dispose
103-
race:vips_block_cache_dispose
104-
race:vips_image_init
105-
race:vips_image_build
106-
race:vips_image_finalize
107-
race:vips_image_dispose
108-
race:vips_threadset_free
234+
race:vips_sink_thread_state_new
235+
race:write_thread_state_new
109236

110-
# guarded with image->sslock, so it should be fine
111-
race:vips__region_start
112-
race:vips__region_stop
113-
race:vips_region_dispose
114-
race:vips__region_take_ownership
115-
116-
# is fine now, see: https://github.com/libvips/libvips/pull/1211
117-
race:vips_image_temp_name
118-
119-
# is fine now, see: https://github.com/libvips/libvips/pull/1483
120-
race:meta_new
121-
race:meta_cp
122-
race:vips_image_set
123-
race:vips__image_copy_fields_array
124-
race:vips__image_meta_copy
237+
# the double-buffered output and write-behind threads are non-racy
238+
race:wbuffer_flush
239+
race:wbuffer_new
240+
race:wbuffer_position
241+
race:wbuffer_write
242+
race:write_free

0 commit comments

Comments
 (0)