~ chicken-core (master) a5ac8c3a58a48109199f75bedbe53b8479db1fe0
commit a5ac8c3a58a48109199f75bedbe53b8479db1fe0
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Tue Sep 1 14:51:46 2026 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Tue Sep 1 14:51:46 2026 +0200
Fix calculation of copied amount in minor GC
Report and fix by "crzcrz".
diff --git a/runtime.c b/runtime.c
index 9b00277f..07817350 100644
--- a/runtime.c
+++ b/runtime.c
@@ -3496,10 +3496,10 @@ C_regparm void C_reclaim(void *trampoline, C_word c)
mark_live_objects(tgt_space_start, tgt_space_top, tgt_space_limit);
mark_nested_objects(start, tgt_space_start, tgt_space_top, tgt_space_limit);
+ if(gc_mode == GC_MINOR) count = (C_uword)*tgt_space_top - (C_uword)start;
start = *tgt_space_top;
if(gc_mode == GC_MINOR) {
- count = (C_uword)C_fromspace_top - (C_uword)start;
++gc_count_1;
++gc_count_1_total;
update_locatives(GC_MINOR, start, *tgt_space_top);
Trap