diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2006-12-13 17:16:22 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2006-12-13 17:16:22 +0000 |
commit | 295222340ad6893caa0a1c3479155f88ea290dc3 (patch) | |
tree | 54db55ab76b89e5a588995a9578cc7c2d71df227 /dump.c | |
parent | d2c837a0af0259b12bbac41550ec7dc972b876d9 (diff) | |
download | perl-295222340ad6893caa0a1c3479155f88ea290dc3.tar.gz |
misc MAD coredump fixes and parser leak fixes
- fix MAD coredump in tr///
- fix mad coredump in multi-line string literals
- kill some MAD uninit value warnings
- don't allow assignment to $n in perly.y
- make op_dump handle op_latefree flags
p4raw-id: //depot/perl@29548
Diffstat (limited to 'dump.c')
-rw-r--r-- | dump.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -739,7 +739,7 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, const OP *o) #ifdef DUMPADDR Perl_dump_indent(aTHX_ level, file, "ADDR = 0x%"UVxf" => 0x%"UVxf"\n", (UV)o, (UV)o->op_next); #endif - if (o->op_flags) { + if (o->op_flags || o->op_latefree || o->op_latefreed) { SV * const tmpsv = newSVpvs(""); switch (o->op_flags & OPf_WANT) { case OPf_WANT_VOID: @@ -767,6 +767,10 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, const OP *o) sv_catpv(tmpsv, ",MOD"); if (o->op_flags & OPf_SPECIAL) sv_catpv(tmpsv, ",SPECIAL"); + if (o->op_latefree) + sv_catpv(tmpsv, ",LATEFREE"); + if (o->op_latefreed) + sv_catpv(tmpsv, ",LATEFREED"); Perl_dump_indent(aTHX_ level, file, "FLAGS = (%s)\n", SvCUR(tmpsv) ? SvPVX_const(tmpsv) + 1 : ""); SvREFCNT_dec(tmpsv); } @@ -2389,7 +2393,7 @@ Perl_do_pmop_xmldump(pTHX_ I32 level, PerlIO *file, const PMOP *pm) level++; if (PM_GETRE(pm)) { char *s = PM_GETRE(pm)->precomp; - SV *tmpsv = newSV(0); + SV *tmpsv = newSVpvn("",0); SvUTF8_on(tmpsv); sv_catxmlpvn(tmpsv, s, strlen(s), 1); Perl_xmldump_indent(aTHX_ level, file, "pre=\"%s\"\n", @@ -2681,7 +2685,7 @@ Perl_do_op_xmldump(pTHX_ I32 level, PerlIO *file, const OP *o) #else if (cSVOPo->op_sv) { SV *tmpsv1 = newSV(0); - SV *tmpsv2 = newSV(0); + SV *tmpsv2 = newSVpvn("",0); char *s; STRLEN len; SvUTF8_on(tmpsv1); |