fix GC problem with chains of ephemerons
A recent GC change (included with the set-of-scopes expander) allows the GCs marking procedure to recur directly to a limited depth, instead of always pushing pointers onto a stack. Direct recursion is not cmopatible with ephemeron-resolution process, so switch to no-recur mode. This problem was uncovered by an existing test.
This commit is contained in:
parent
dd0ced3c02
commit
123f724c47
|
@ -313,6 +313,8 @@ static int mark_ready_ephemerons(GCTYPE *gc)
|
||||||
GC_Ephemeron *waiting = NULL, *next, *eph;
|
GC_Ephemeron *waiting = NULL, *next, *eph;
|
||||||
int did_one = 0;
|
int did_one = 0;
|
||||||
|
|
||||||
|
GC_mark_no_recur(gc, 1);
|
||||||
|
|
||||||
for (eph = gc->ephemerons; eph; eph = next) {
|
for (eph = gc->ephemerons; eph; eph = next) {
|
||||||
next = eph->next;
|
next = eph->next;
|
||||||
if (is_marked(gc, eph->key)) {
|
if (is_marked(gc, eph->key)) {
|
||||||
|
@ -326,6 +328,8 @@ static int mark_ready_ephemerons(GCTYPE *gc)
|
||||||
}
|
}
|
||||||
gc->ephemerons = waiting;
|
gc->ephemerons = waiting;
|
||||||
|
|
||||||
|
GC_mark_no_recur(gc, 0);
|
||||||
|
|
||||||
return did_one;
|
return did_one;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user