]> granicus.if.org Git - gc/commit
Eliminate TSan warnings (false positives) in gctest
authorIvan Maidanski <ivmai@mail.ru>
Wed, 1 Nov 2017 21:31:11 +0000 (00:31 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 1 Nov 2017 21:32:23 +0000 (00:32 +0300)
commitc7837f864970e3859a3b35b9b8c0858a3548a457
treef578a865293e6ca6217c9de408f99dd94a06c476
parent36a586224fc45c0532f605311c452d344615f92d
Eliminate TSan warnings (false positives) in gctest

* tests/test.c (struct SEXPR): Declare first.
* tests/test.c (union sexpr_or_aot_u): New type.
* tests/test.c (struct SEXPR): Replace struct SEXPR* to sexpr_or_aot_u.
* tests/test.c (car, cdr, small_cons_uncollectable): Add .p suffix when
accessing sexpr_car and sexpr_cdr fields.
* tests/test.c [GC_GCJ_SUPPORT] (fake_gcj_mark_proc, gcj_cons):
Likewise.
* tests/test.c  [!VERY_SMALL_CONFIG] (small_cons): Likewise.
* tests/test.c (atomic_car, atomic_cdr): New macro; add comment.
* tests/test.c [!VERY_SMALL_CONFIG] (cons): Store atomic_car and
atomic_cdr atomically.
* tests/test.c [VERY_SMALL_CONFIG] (small_cons): Likewise.
* tests/test.c [!VERY_SMALL_CONFIG] (cons): Ignore store random value
at *p if p points inside r->sexpr_car/cdr; add comment.
* tests/test.c (reverse1, check_ints): Use atomic_car() and
atomic_cdr() instead of car() and cdr(), respectively.
* tests/test.c (reverse_test_inner): Move A.dummy=17 to
set_print_procs().
* tests/test.c (set_print_procs): Add comment.
tests/test.c