Skip to content

Commit

Permalink
[gc] fix crash when allocate_registers causes a GC
Browse files Browse the repository at this point in the history
then CallContext->bp_ps is still zeroed, and CallContext.mark must
not access them.

Repro: ./parrot --gc ms2 examples/benchmarks/oofib.pir
(recursive calls)
  • Loading branch information
Reini Urban committed Nov 17, 2014
1 parent 17e3545 commit 18c6a70
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pmc/callcontext.pmc
Expand Up @@ -645,6 +645,8 @@ Mark any referenced strings and PMCs.
UINTVAL i;

GET_ATTR_bp_ps(INTERP, SELF, bp_ps);
if (!bp_ps.regs_p) /* in allocate_registers */
return;

for (i = 0; i < regs_p; ++i) {
PMC * const p = bp_ps.regs_p[-1L-(i)];
Expand Down

0 comments on commit 18c6a70

Please sign in to comment.