Chez Scheme GC: fix interaction of backtrace and incremental promotion

Disable incremental promotion when backreferences are enabled,
otherwise the backreference list for a generation can have
references to younger-generation objects.
This commit is contained in:
Matthew Flatt 2020-10-06 15:09:05 -06:00
parent 8a14d31f06
commit 716e6d9435

View File

@ -1092,7 +1092,7 @@ static void check_dirty() {
}
if (s != space_new && s != space_impure && s != space_count_impure && s != space_symbol && s != space_port
&& s != space_impure_record && s != space_impure_typed_object && s != space_immobile_impure
&& s != space_weakpair && s != space_ephemeron) {
&& s != space_weakpair && s != space_ephemeron && s != space_closure) {
S_checkheap_errors += 1;
printf("!!! (check_dirty): unexpected space %d for dirty segment "PHtx"\n", s, (ptrdiff_t)(si->number));
}
@ -1290,6 +1290,7 @@ ptr S_gc(ptr tc, IGEN max_cg, IGEN min_tg, IGEN max_tg, ptr count_roots) {
if (min_tg == static_generation
|| S_G.enable_object_counts || S_G.enable_object_backreferences
|| (count_roots != Sfalse)) {
if (S_G.enable_object_backreferences) min_tg = max_tg;
return S_gc_oce(tc, max_cg, min_tg, max_tg, count_roots);
#if defined(PTHREADS)
} else if (S_collect_waiting_threads != 0) {