develooper Front page | perl.perl5.porters | Postings from February 2015

[perl #123802] Segfault in Perl_yyparse with minimized test case from #123801

Thread Previous
From:
Father Chrysostomos via RT
Date:
February 23, 2015 00:43
Subject:
[perl #123802] Segfault in Perl_yyparse with minimized test case from #123801
Message ID:
rt-4.0.18-20481-1424652196-1119.123802-15-0@perl.org
On Fri Feb 13 16:57:12 2015, hv wrote:
> I'm getting the [perl #123801] assert failure, using the minimized
> testcase in this ticket:
> 
> ./miniperl -e '/$0{}/'
> 
> The assertion is happening inside SvIVX around toke.c:4550 in blead:
> 
> /* m'foo' still needs to be parsed for possible (?{...}) */
> if (SvIVX(PL_linestr) == '\'' && !PL_lex_inpat) {
> 
> .. where PL_linestr looks like:
> 
> (gdb) p /x *PL_parser->linestr
> $3 = {sv_any = 0xa42ef0, sv_refcnt = 0x1, sv_flags = 0x4403, sv_u = {
>      svu_pv = 0xa5f820, svu_iv = 0xa5f820, svu_uv = 0xa5f820, svu_nv =
> 0x0,
>      svu_rv = 0xa5f820, svu_rx = 0xa5f820, svu_array = 0xa5f820,
>     svu_hash = 0xa5f820, svu_gp = 0xa5f820, svu_fp = 0xa5f820}}
> 
> The assert is complaining that sv is of type PV, so it isn't valid to
> call SvIVX on it.
> 
> I've managed to establish that sv isn't coming from a newSV_type()
> call, but that's as far as I've got so far.

This assertion failure is fixed in f4460c6f7a, but I get another one now:

$ echo -n '/$0{}/' | ./miniperl
Assertion failed: (SvTYPE(sv) != (svtype)SVTYPEMASK), function Perl_sv_clear, file sv.c, line 6536.
Abort trap: 6

This seems to have to do with perly.c not reference-counting PL_compcv correctly.  But I could be wrong.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=123802

Thread Previous


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