From a5df8fc8f5f22ba561a39b3eb752766cb62d7f71 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 28 Sep 2018 11:01:15 +0200 Subject: cmake: Suppress helgrind race condition warning we created on purpose Signed-off-by: Andreas Schneider Reviewed-by: Ralph Boehme --- src/socket_wrapper.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index 36482c6..7a27b40 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -659,6 +659,12 @@ static void swrap_mutex_unlock(pthread_mutex_t *mutex) } } +/* + * These macros have a thread race condition on purpose! + * + * This is an optimization to avoid locking each time we check if the symbol is + * bound. + */ #define swrap_bind_symbol_libc(sym_name) \ if (swrap.libc.symbols._libc_##sym_name.obj == NULL) { \ swrap_mutex_lock(&libc_symbol_binding_mutex); \ -- cgit v1.2.3