develooper Front page | perl.perl5.porters | Postings from January 2017

Re: [perl #126191] null ptr deref and segfault: Perl_pad_add_anon(pad.c:821) [perl 5.21.7]

Thread Previous | Thread Next
From:
Zefram
Date:
January 27, 2017 11:18
Subject:
Re: [perl #126191] null ptr deref and segfault: Perl_pad_add_anon(pad.c:821) [perl 5.21.7]
Message ID:
20170127111729.GA24314@fysh.org
Looking a bit further, it turns out the problem is that the save stack
gets out of synch with the parser stack.  Coincident with the first
syntax error, part of the save stack gets popped, to a point further
back than it was at the start of the first sub{}, while the parser state
with the pending action to handle the end of that construct remains
in place.  The second sub{} reuses the same save stack positions that
the first used.  As a result, the save stack popping in newATTRSUB_x()
doesn't manage to restore to a sane state, and in particular doesn't
manage to restore PL_compcv.

-zefram

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About