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

Re: fresh_perl failure

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
September 20, 2010 08:45
Subject:
Re: fresh_perl failure
Message ID:
20100920154506.GA11226@plum.flirble.org
On Mon, Sep 20, 2010 at 02:06:21PM +0100, Dave Mitchell wrote:
> On Mon, Sep 20, 2010 at 08:01:29PM +1000, Tony Cook wrote:
> > On Mon, Sep 20, 2010 at 10:48:15AM +0100, Dave Mitchell wrote:
> > > On Mon, Sep 20, 2010 at 10:18:20AM +0100, Nicholas Clark wrote:
> > > > On Mon, Sep 20, 2010 at 10:57:05AM +0200, Rafael Garcia-Suarez wrote:
> > > > > t/run/fresh_perl.t fails for me on linux and OSX :
> > > > > 
> > > > > run/fresh_perl.t (Wstat: 0 Tests: 94 Failed: 5)
> > > > >   Failed tests:  49-53
> 
> Thanks guys. Hopefully now fixed with e4487e9b537f1be1e95aba1c87790c2a411788a7
> 
> My reproducibility issue was down to the ordering of GVs in the arena,
> which changed between 32-bit and 64-bit builds (I think).

On 32 bit systems (for me - tried x86 FreeBSD and x86 Debian) I see test
53 of t/run/fresh_perl.t fail.

Tweaking it slightly to this:

$ cat fp53.pl
package X;
sub any { bless {} }
my $f = "FH000"; # just to thwart any future optimisations
sub afh { select select ++$f; my $r = *{$f}{IO}; delete $X::{$f}; bless $r }
sub DESTROY { print "destroyed $_[0]\n" }
package main;
warn $x = any X; # to bump sv_objcount. IO objs aren't counted??
*f = afh X;

$ ./perl -Ilib fp53.pl 
X=HASH(0x83e5198)destroyed X=HASH(0x83e5198)

Compare with

$ perl fp53.pl
X=HASH(0x8153d48) at fp53.pl line 7.
destroyed X=HASH(0x8153d48)
destroyed X=IO(0x81546b4)


So it seems that the value from &afh is no longer getting destroyed (for some
ordering of GVs)

Also the above output is exactly correct - there is no longer the "at ..."
line after the stringification of the reference in the output of warn.
I'm not sure if I like that change.

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