From: Reini Urban Date: Wed, 25 Jun 2008 17:30:08 +0000 (+0200) Subject: Re: split smoke for threaded -DDEBUGGING builds X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6cefa69e9d69185d0ec476bab9be486186bafdb2;p=p5sagit%2Fp5-mst-13.2.git Re: split smoke for threaded -DDEBUGGING builds Message-ID: <48626480.7030602@x-ray.at> Plus revert #34086 p4raw-id: //depot/perl@34087 --- diff --git a/dump.c b/dump.c index c556cec..456a130 100644 --- a/dump.c +++ b/dump.c @@ -2002,11 +2002,13 @@ Perl_debop(pTHX_ const OP *o) switch (o->op_type) { case OP_CONST: case OP_HINTSEVAL: - /* with ITHREADS, consts are stored in the pad, and the right pad + /* 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])) + * Looks like only during compiling the pads are illegal. */ - if (((SVOP*)o)->op_sv) +#ifdef USE_ITHREADS + if ((((SVOP*)o)->op_sv) || !IN_PERL_COMPILETIME) +#endif PerlIO_printf(Perl_debug_log, "(%s)", SvPEEK(cSVOPo_sv)); break; case OP_GVSV: diff --git a/t/op/split.t b/t/op/split.t index b846f5e..025327f 100755 --- a/t/op/split.t +++ b/t/op/split.t @@ -6,8 +6,6 @@ BEGIN { require './test.pl'; } -use Config; - plan tests => 135; $FS = ':'; @@ -52,15 +50,8 @@ $_ = join(':', split(/:/,'1:2:3:4:5:6:::', 999)); is($_ , '1:2:3:4:5:6:::'); # Does assignment to a list imply split to one more field than that? -SKIP: { - if ($Config{useithreads}) { - skip("No IV value dump with threads", 1); - } - else { - $foo = runperl( switches => ['-Dt'], stderr => 1, prog => '($a,$b)=split;' ); - ok($foo =~ /DEBUGGING/ || $foo =~ /const\n?\Q(IV(3))\E/); - } -} +$foo = runperl( switches => ['-Dt'], stderr => 1, prog => '($a,$b)=split;' ); +ok($foo =~ /DEBUGGING/ || $foo =~ /const\n?\Q(IV(3))\E/); # Can we say how many fields to split to when assigning to a list? ($a,$b) = split(' ','1 2 3 4 5 6', 2);