From: Reini Urban Date: Tue, 24 Jun 2008 12:07:01 +0000 (+0200) Subject: fix debop with pad const X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7367e658df87ee1f29b1fa68bdefb1966bf4b5d9;p=p5sagit%2Fp5-mst-13.2.git fix debop with pad const Message-ID: <4860C745.2020307@x-ray.at> p4raw-id: //depot/perl@34085 --- diff --git a/dump.c b/dump.c index 29fb489..c556cec 100644 --- a/dump.c +++ b/dump.c @@ -2002,7 +2002,12 @@ Perl_debop(pTHX_ const OP *o) switch (o->op_type) { case OP_CONST: case OP_HINTSEVAL: - PerlIO_printf(Perl_debug_log, "(%s)", SvPEEK(cSVOPo_sv)); + /* with ITHREADS, consts are stored in the pad, and the right pad + * may not be active here, so check. + * (((SVOP*)o)->op_sv ? ((SVOP*)o)->op_sv : ((my_perl->Icurpad)[(o)->op_targ])) + */ + if (((SVOP*)o)->op_sv) + PerlIO_printf(Perl_debug_log, "(%s)", SvPEEK(cSVOPo_sv)); break; case OP_GVSV: case OP_GV: