develooper Front page | perl.perl5.porters | Postings from April 2010

Re: 5.12 regression.

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
April 10, 2010 13:10
Subject:
Re: 5.12 regression.
Message ID:
20100410201022.GY9998@plum.flirble.org
On Sat, Apr 10, 2010 at 08:09:13PM +0200, Abigail wrote:
> 
> I ran 5.12-RC5 against t/japh/abigail.t. A couple of them failed because
> split in scalar context no longer splits to @_.
> 
> However, there's another failure; a reduced version of it is:
> 
> 
>     $ perl-5.10.1 -wE '$_ = "goto F.say chop;\n=X";F1:eval'
>     X
>     $ perl-5.12-RC5 -wE '$_ = "goto F.say chop;\n=X";F1:eval'
>     X
>     =
> 

> followed by an infinite amount of newlines.
> 
> I haven't been able to reduce this to a smaller piece of code. But it 
> looks like the eval is working on a copy of $_ which doesn't get updated
> when the chop modifies $_.

I bisected with:

#!/bin/sh
git clean -dxf
# If you can use ccache, add -Dcc=ccache\ gcc -Dld=gcc to the Configure line
# if Encode is not needed for the test, you can speed up the bisect by
# excluding it from the runs with -Dnoextensions=Encode
sh Configure -des -Dusedevel -Doptimize="-g" -Dcc=ccache\ gcc -Dld=gcc
test -f config.sh || exit 125
# Correct makefile for newer GNU gcc
perl -ni -we 'print unless /<(?:built-in|command)/' makefile x2p/makefile
# if you just need miniperl, replace test_prep with miniperl
make -j4 miniperl
[ -x ./miniperl ] || exit 125
test `./miniperl -Ilib -wE '$_ = "goto F.say chop;\n=X";F1:eval' | head -2 | wc -l` = 1
ret=$?
[ $ret -gt 127 ] && ret=127
git clean -dxf


[our recipe in perlrepository.pod should probably run ./Configure </dev/null
as one of the bisect points had a MANIFEST error and Configure stopped to ask
a question]

It's this commit:

commit dca6062a863d0e957d067cc75f9e13b2e28b1090
Author: Nicholas Clark <nick@ccl4.org>
Date:   Mon Apr 7 11:29:51 2008 +0000

    Eliminate cop_label from struct cop by storing a label as the first
    entry in the hints hash. Most statements don't have labels, so this
    will save memory. Not sure how much.
    
    p4raw-id: //depot/perl@33656

 cop.h              |   14 +++-----------
 embed.fnc          |    3 ++-
 embed.h            |    2 ++
 ext/B/B/Deparse.pm |    3 ++-
 global.sym         |    1 +
 hv.c               |   25 +++++++++++++++++++++++++
 op.c               |   21 ++++++++++++++++-----
 proto.h            |    2 +-
 8 files changed, 52 insertions(+), 19 deletions(-)


I don't have any idea why this trips up your computed label code.

Nicholas Clark

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