summaryrefslogtreecommitdiff
path: root/blacklst.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2017-12-01 10:35:59 +0300
committerIvan Maidanski <ivmai@mail.ru>2017-12-01 10:35:59 +0300
commit1dc2066460912e132e5aaf48eac30f6261ed23d9 (patch)
treeeaaeb17a711bd2bef8c9d0ef9d345d9bf80838fa /blacklst.c
parent236aeca34ea59db3f57fc1bcbb01e4e8672e409f (diff)
downloadbdwgc-1dc2066460912e132e5aaf48eac30f6261ed23d9.tar.gz
Workaround TSan false positives in add_to_black_list_normal/stack
* blacklst.c (GC_add_to_black_list_normal, GC_add_to_black_list_stack): Call set_pht_entry_from_index_concurrent() instead of set_pht_entry_from_index(). * include/private/gc_priv.h [PARALLEL_MARK && THREAD_SANITIZER] (set_pht_entry_from_index_concurrent): New macro (use AO_or). * include/private/gc_priv.h [!PARALLEL_MARK || !THREAD_SANITIZER] (set_pht_entry_from_index_concurrent): Define to set_pht_entry_from_index.
Diffstat (limited to 'blacklst.c')
-rw-r--r--blacklst.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/blacklst.c b/blacklst.c
index c06fbdde..23d6a319 100644
--- a/blacklst.c
+++ b/blacklst.c
@@ -193,7 +193,7 @@ GC_INNER void GC_unpromote_black_lists(void)
GC_print_blacklisted_ptr(p, source, "normal");
}
# endif
- set_pht_entry_from_index(GC_incomplete_normal_bl, index);
+ set_pht_entry_from_index_concurrent(GC_incomplete_normal_bl, index);
} /* else this is probably just an interior pointer to an allocated */
/* object, and isn't worth black listing. */
}
@@ -214,7 +214,7 @@ GC_INNER void GC_unpromote_black_lists(void)
GC_print_blacklisted_ptr(p, source, "stack");
}
# endif
- set_pht_entry_from_index(GC_incomplete_stack_bl, index);
+ set_pht_entry_from_index_concurrent(GC_incomplete_stack_bl, index);
}
}