From 76ec6d5a8a3c4ca3d765148be7ae806db50b839f Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 25 Mar 2017 13:37:05 +0000 Subject: [PATCH] init a few more types directly threadstate objects inited during startup, since they can (potentially) be built from threads --- libvips.supp | 31 +++++++++++++++++++++++++++++++ libvips/iofuncs/init.c | 6 ++++++ 2 files changed, 37 insertions(+) diff --git a/libvips.supp b/libvips.supp index 42244c8b..c58b1115 100644 --- a/libvips.supp +++ b/libvips.supp @@ -396,3 +396,34 @@ fun:rb_enc_str_new } + +# helgrind stuff + +{ + helgrind1 + Helgrind:Race + fun:g_thread_proxy + ... + fun:start_thread + fun:clone +} + +{ + helgrind2 + Helgrind:Race + fun:strlen + fun:pthread_setname_np + fun:g_system_thread_set_name + fun:g_thread_proxy + ... + fun:start_thread + fun:clone +} + +# g_private*_() triggers a lot of warnings :( +{ + helgrind3 + Helgrind:Race + fun:g_private_set + fun:vips_thread_run +} diff --git a/libvips/iofuncs/init.c b/libvips/iofuncs/init.c index 3b7efb23..a606f8a4 100644 --- a/libvips/iofuncs/init.c +++ b/libvips/iofuncs/init.c @@ -258,6 +258,9 @@ int vips_init( const char *argv0 ) { extern GType vips_system_get_type( void ); + extern GType write_thread_state_get_type( void ); + extern GType sink_memory_thread_state_get_type( void ); + extern GType render_thread_state_get_type( void ); static gboolean started = FALSE; static gboolean done = FALSE; @@ -360,6 +363,9 @@ vips_init( const char *argv0 ) */ (void) vips_image_get_type(); (void) vips_region_get_type(); + (void) write_thread_state_get_type(); + (void) sink_memory_thread_state_get_type(); + (void) render_thread_state_get_type(); vips__meta_init_types(); vips__interpolate_init(); im__format_init();