Fix incorrect roots order after root removal in remove_roots_subregion
authorIvan Maidanski <ivmai@mail.ru>
Fri, 3 Aug 2018 16:43:18 +0000 (19:43 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 3 Aug 2018 16:43:18 +0000 (19:43 +0300)
commitae3d724f3645af119e1b2c2cefbb71c97d467546
treeff2d23ab5eb4e736b2c197b395d8e8554e6f6183
parent2d98a9b8ed79a68ea7ed3e34729d4a006e3fdd8e
Fix incorrect roots order after root removal in remove_roots_subregion
(fix of commits 38d194a, e849b45)

Issue #218 (bdwgc).

* mark_rts.c [USE_PROC_FOR_LIBRARIES] (swap_static_roots): New inline
function.
* mark_rts.c [USE_PROC_FOR_LIBRARIES] (GC_remove_roots_subregion):
Use swap_static_roots (after GC_add_roots_inner); if there is
a temporary root after GC_remove_root_at_pos then swap it with the
appropriate non-temporary one to ensure all temporary roots are
grouped at the end.
mark_rts.c