Skip to content

Commit

Permalink
[GH #875] Fix SEGV with empty GC self->work_list in the grey marker
Browse files Browse the repository at this point in the history
See #875
Do not mark a PMC as grey if the self->work_list is empty.
I do not know if that is correct, but it fixed the issue.
  • Loading branch information
Reini Urban committed Dec 6, 2012
1 parent 4aee736 commit ddf6aec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gc/gc_gms.c
Expand Up @@ -1213,8 +1213,10 @@ gc_gms_mark_pmc_header(PARROT_INTERP, ARGMOD(PMC *pmc))
/* mark it live. */ /* mark it live. */
PObj_live_SET(pmc); PObj_live_SET(pmc);


Parrot_pa_remove(interp, self->objects[gen], item->ptr); if (self->work_list) {
item->ptr = Parrot_pa_insert(self->work_list, item); Parrot_pa_remove(interp, self->objects[gen], item->ptr);
item->ptr = Parrot_pa_insert(self->work_list, item);
}
} }


/* /*
Expand Down

0 comments on commit ddf6aec

Please sign in to comment.