From 9cd54893c0097b5b763dc9657e3c228492cdb87f Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Tue, 14 Nov 2006 12:31:57 +0000 Subject: [PATCH] Fix (yet another) odd interaction between selector thunks and compacting GC This should fix errors of the form internal error: scavenge_mark_stack: unimplemented/strange closure type 28 @ 0x2b92e5f79960 But since it's quite difficult to reproduce the error, I can't be 100% certain it's gone. I certainly can't reproduce it again after the fix, anyway. --- rts/sm/Evac.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rts/sm/Evac.c b/rts/sm/Evac.c index bae6ed7..6ca7d85 100644 --- a/rts/sm/Evac.c +++ b/rts/sm/Evac.c @@ -846,6 +846,14 @@ selector_loop: if (thunk_selector_depth >= MAX_THUNK_SELECTOR_DEPTH) { break; } + + // we don't update THUNK_SELECTORS in the compacted + // generation, because compaction does not remove the INDs + // that result, this causes confusion later. + if (Bdescr((P_)selectee)->flags && BF_COMPACTED) { + break; + } + thunk_selector_depth++; val = eval_thunk_selector(info->layout.selector_offset, -- 1.7.10.4