Permalink
Browse files

[GH #875] Fix SEGV with empty GC self->work_list in the grey marker

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...
1 parent 4aee736 commit ddf6aecbba856ff389ac9e75c5639a11ee4ec101 Reini Urban committed Dec 6, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/gc/gc_gms.c
View
@@ -1213,8 +1213,10 @@ gc_gms_mark_pmc_header(PARROT_INTERP, ARGMOD(PMC *pmc))
/* mark it live. */
PObj_live_SET(pmc);
- Parrot_pa_remove(interp, self->objects[gen], item->ptr);
- item->ptr = Parrot_pa_insert(self->work_list, item);
+ if (self->work_list) {
+ Parrot_pa_remove(interp, self->objects[gen], item->ptr);
+ item->ptr = Parrot_pa_insert(self->work_list, item);
+ }
}
/*

0 comments on commit ddf6aec

Please sign in to comment.