Skip Menu |

This queue is for tickets about the Contextual-Return CPAN distribution.

Report information
The Basics
Id: 76735
Status: open
Priority: 0/
Queue: Contextual-Return

People
Owner: Nobody in particular
Requestors: zengargoyle [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: odd t/failures.t on 0.004003 5.14.2 solaris
Date: Fri, 20 Apr 2012 19:45:27 -0700
To: bug-Contextual-Return [...] rt.cpan.org
From: zengargoyle <zengargoyle [...] gmail.com>
I get an odd single failure: t/failures.t .................. 1/? # Failed test 'Line number correct at line 1' # at t/failures.t line 20. # Looks like you failed 1 test of 25. t/failures.t .................. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/25 subtests i change the test for more information: sub ok_if_warn { my ($msg, $line) = @_; return sub { # diag( "Caught warning: '@_'" ); ok $_[0] =~ $msg => "Warn msg correct at line $line"; #ok $_[0] =~ /line $line\.?\Z/ => "Line number correct at line $line"; like $_[0], qr/line $line\.?\Z/ => "Line number correct at line $line"; } } and i get: t/failures.t .................. 1/? # Failed test 'Line number correct at line 1' # at t/failures.t line 21. # 'use Contextual::Return (?^:HANDLER) didn't export anything at (eval 19) line 2. # ' # doesn't match '(?^:line 1\.?\Z)' # Looks like you failed 1 test of 25. t/failures.t .................. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/25 subtests so i change the qr// to qw// : local $SIG{__WARN__} = ok_if_warn q{didn't export anything}, 1; #eval 'use Contextual::Return qr/HANDLER/'; eval 'use Contextual::Return qw/HANDLER/'; and the test now passes. I'm unsure where to look for the cause of this, I keep synchronized builds of mostly identical Perls on sun4-solaris, i86pc-solaris, x86_64-linux, and i686-linux. Using GCC on linux and Sun's compiler on solaris. This test fails on the Sun compiled solaris, but doesn't on GCC compiled linux. Is the use of qr// intentional? Any idea what could be causing this difference between OSs? Should I take this up with p5p? Any insight would be appreciated. ---- Summary of my perl5 (revision 5 version 14 subversion 2) configuration: Platform: osname=solaris, osvers=2.10, archname=i86pc-solaris uname='sunos tak.usc.edu 5.10 generic_125101-03 i86pc i386 i86pc ' config_args='-des -Dprefix=/ -Dusesitecustomize -Duserelocatableinc -Dlibpth=/usr/lib /usr/ccs/lib -Uloclibpth' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags =' -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV', optimize='-O', cppflags='' ccversion='Sun C 5.10 SunOS_i386 2009/06/03', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/lib -L/usr/ccs/lib ' libpth=/usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-KPIC', lddlflags='-G -L/usr/lib -L/usr/ccs/lib' Characteristics of this binary (from libperl): Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_USE_SAFE_PUTENV USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF USE_SITECUSTOMIZE Locally applied patches: [blead 78f4d41] In Configure, refactor the test for procselfexe into a loop. [blead 2dd82a4] Teach Configure about "procselfexe" on Solaris and NetBSD [blead 24ffea6] Make sitecustomize relocatableinc aware Built under solaris Compiled at Nov 29 2011 15:46:56 %ENV: PERL5LIB="/export/home/perl5/fakeroot/build/lib/site_perl/5.14.2/i86pc-solaris:/export/home/perl5/fakeroot/build/lib/site_perl/5.14.2:/export/home/perl5/fakeroot/build/lib/5.14.2/i86pc-solaris:/export/home/perl5/fakeroot/build/lib/5.14.2" PERL5OPT="" PERL5_CPANPLUS_IS_RUNNING="16222" PERL5_CPAN_IS_RUNNING="16222" PERL_MB_OPT="--prefix /export/home/perl5/fakeroot/build" PERL_MM_OPT="PREFIX=/export/home/perl5/fakeroot/build/" @INC: /export/home/perl5/fakeroot/build/lib/site_perl/5.14.2/i86pc-solaris /export/home/perl5/fakeroot/build/lib/site_perl/5.14.2 /export/home/perl5/fakeroot/build/lib/5.14.2/i86pc-solaris /export/home/perl5/fakeroot/build/lib/5.14.2 /export/home/perl/5.14.2/lib/site_perl/5.14.2/i86pc-solaris /export/home/perl/5.14.2/lib/site_perl/5.14.2 /export/home/perl/5.14.2/lib/5.14.2/i86pc-solaris /export/home/perl/5.14.2/lib/5.14.2 .
Subject: Re: [rt.cpan.org #76735] odd t/failures.t on 0.004003 5.14.2 solaris
Date: Sat, 21 Apr 2012 09:00:31 +0200
To: bug-Contextual-Return [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Show quoted text
> Is the use of qr// intentional?
Yes. I'm testing whether the "export anything that matches this pattern" mechanism fails correctly. Show quoted text
> Any idea what could be causing this difference > between OSs?
Looks like the eval $STR on teh Solaris build produces an out-by-one error on the line number. Show quoted text
> Should I take this up with p5p?
If this: eval "die"; print $@; doesn't print Died at (eval 1) line 1. Then we have a reproducible buglet that might be worth reporting. Because the error message on Solaris: 'use Contextual::Return (?^:HANDLER) didn't export anything at (eval 19) line 2. is odd. Why line 2, when the entire eval string is one line long? If you can reproduce it, it's worth reporting. BTW, I can't replicate it on MacOS. Damian Damian
Subject: Re: [rt.cpan.org #76735] odd t/failures.t on 0.004003 5.14.2 solaris
Date: Sun, 22 Apr 2012 15:52:20 -0700
To: bug-Contextual-Return [...] rt.cpan.org
From: zengargoyle <zengargoyle [...] gmail.com>
On Sat, Apr 21, 2012 at 12:01 AM, damian@conway.org via RT <bug-Contextual-Return@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=76735 > > > Looks like the eval $STR on teh Solaris build produces an > out-by-one error on the line number. >
>> Should I take this up with p5p?
> > If this: > >    eval "die"; >    print $@; > > doesn't print > >    Died at (eval 1) line 1. > > Then we have a reproducible buglet > that might be worth reporting.
So, the simple eval test led nowhere, output on Solaris is as expected: Died at (eval 1) line 1. But putting things in a module's import does go wonky: package FooCarp; use Carp (); sub import { $c = shift; Carp::carp if shift } 1; #!/usr/bin/env perl # test5.pl eval 'use FooCarp qw(yes_die)'; print $@; Solaris: at (eval 1) line 2 Linux: at (eval 1) line 1. It's odd that it hasn't turned up before, and is consistent across several versions of Perl compiled variously with GCC / Sun Workshop CC on Solaris. I thought this would be eval or Carp but the simple eval test was ok and I noticed that you did your own Carp magic in C::R, so maybe it's in caller()? If you have any other insights please share. I may try to dig a little deeper before posting to p5p. Thanks for the pointer. ----
Subject: Re: [rt.cpan.org #76735] odd t/failures.t on 0.004003 5.14.2 solaris
Date: Mon, 23 Apr 2012 06:42:45 +0200
To: bug-Contextual-Return [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Show quoted text
> If you have any other insights please share.
Only that your test case worked as expected (e.g. reported "line 1") on MacOSX for Perl's 5.8.9, 5.10.1, 5.12.4, 5.14.2, and blead. Damian