On Fri, Apr 09, 2004 at 01:51:02AM +0100, Nicholas Clark wrote:

> I don't think that ponie has changed anything (at least intentionally) in this
> area. Given that I can add an assertion to vanilla perl 5 that codifies
> your previous paragraph (either AV or null) and existing tests fail, I
> suspect that ponie is tickling an existing "problem". I wonder if it only
> shows up because of the deliberately aggressive policy of the MUMBLE macro -
> ie by inverting the bits on PMC pointers make all illegal reads SEGV.
> Without this all the assertion failures and the failure I describe would be
> hidden - (I'm inferring that) garbage data is read but never acted upon.

For the moment I've checked in this change, which side steps the problem.
I'm not sure if this is really actually a bug, given that the item popped
from the savestack could not have been an array (its pointer isn't bitflipped)

  @@ -1035,8 +1045,10 @@
            break;
        case SAVEt_COMPPAD:
            PL_comppad = (PAD*)SSPOPPTR;
  -         if (PL_comppad)
  +         if (PL_comppad && SvTYPE(PL_comppad) != SVTYPEMASK) {
  +             assert(SvTYPE(PL_comppad) == SVt_PVAV);
                PL_curpad = AvARRAY(PL_comppad);
  +         }
            else
                PL_curpad = Null(SV**);
            break;

Nicholas Clark

Reply via email to