I don’t believe there is an actual bug here (only a theoretical one), but comparing pointers into an array that has been reallocated meanwhile is not a good idea.
/* execute the code in the {...} */
dSP;
- SV ** before;
+ PADOFFSET before;
OP * const oop = PL_op;
COP * const ocurcop = PL_curcop;
OP *nop;
/* we don't use MULTICALL here as we want to call the
* first op of the block of interest, rather than the
* first op of the sub */
- before = SP;
+ before = SP-PL_stack_base;
PL_op = nop;
CALLRUNOPS(aTHX); /* Scalar context. */
SPAGAIN;
- if (SP == before)
+ if (SP-PL_stack_base == before)
ret = &PL_sv_undef; /* protect against empty (?{}) blocks. */
else {
ret = POPs;