Add GC_reachable_here after GC_END_STUBBORN_CHANGE in tests
authorIvan Maidanski <ivmai@mail.ru>
Thu, 21 Jun 2018 21:57:09 +0000 (00:57 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 21 Jun 2018 21:57:09 +0000 (00:57 +0300)
commit263ffbbfd303ac0a62e272ff23baa04139f2009b
tree6c299de93fa5ec57c689b815b20ca2295f65c0ef
parente8e76b5d8f13994fa3b7d9ff9e0582a217f05f6b
Add GC_reachable_here after GC_END_STUBBORN_CHANGE in tests
(fix of commits b52c140d3f72fc9d4308a380c3a)

* tests/disclaim_test.c (pair_dct, pair_new): Call GC_reachable_here
for the stored pointers after GC_end_stubborn_change call.
* tests/staticrootslib.c (libsrl_mktree): Call GC_reachable_here for
the stored pointers after GC_END_STUBBORN_CHANGE call.
* tests/test.c (cons, small_cons, small_cons_uncollectable, mktree,
typed_test): Likewise.
* tests/test.c [GC_GCJ_SUPPORT] (gcj_cons): Likewise.
* tests/test.c [!SMALL_CONFIG && !GC_DEBUG] (alloc8bytes): Likewise.
* tests/test_cpp.cc [!DONT_USE_STD_ALLOCATOR] (main): Likewise.
* tests/trace_test.c (mktree): Likewise.
* tests/test.c (reverse_test_inner): Declare tmp local variable; call
GC_END_STUBBORN_CHANGE() and GC_reachable_here() after storing pointers
to f[5], g[799] and h[1999].
* tests/test_cpp.cc (C_INIT_LEFT_RIGHT): New macro (to call
GC_END_STUBBORN_CHANGE and GC_reachable_here).
* tests/test_cpp.cc (C::C): Use C_INIT_LEFT_RIGHT().
* tests/test_cpp.cc (main): Remove GC_end_stubborn_change(c) call after
because GC_END_STUBBORN_CHANGE() is now called for this (in
C_INIT_LEFT_RIGHT) of the heap-allocated objects.
tests/disclaim_test.c
tests/staticrootslib.c
tests/test.c
tests/test_cpp.cc
tests/trace_test.c