develooper Front page | perl.perl5.porters | Postings from February 2009

[perl #63150] 5.8.9 panic restartop on certain goto

Thread Next
Bram via RT
February 15, 2009 09:25
[perl #63150] 5.8.9 panic restartop on certain goto
Message ID:
On Tue Feb 10 16:38:05 2009, kryde wrote:
> The program below run in my build of 5.8.9 ends with
>     panic: restartop
> where I hoped it would get to the "done" print.
> is a cut-down version of my Tie::TZ module version 4 on cpan.
> The problem might be specific to perl 5.8.9. is ok for me in
> debian packaged 5.10.0, and cpantesters reports say the module is ok
> in
> 5.8.8, but not 5.8.9 (across various systems).
It seems to be a specific 5.8.9 problem.. (or maybe the bug is hiding 
in blead/maint-5.10)

Binary search on maint-5.8:

package MyTie;
use strict;
use warnings;
use POSIX ();

use vars qw($TZ);
tie $TZ, __PACKAGE__;

my $my_tzset;

my ($class) = @_;
my $self = 'dummy';
return bless \$self, $class;

sub FETCH {
#print "fetch\n";
return 'abc';

sub STORE {
my $self = shift;
my $newval = shift;
#print "store ",(defined $newval ? $newval : 'undef'),"\n";

#print " goto tzset() $my_tzset\n";
goto $my_tzset;

$my_tzset = sub {
#print " my_tzset runs\n";
$my_tzset = \&POSIX::tzset;

package main;
use strict;
use warnings;

eval {
#print "start of eval\n";
local $MyTie::TZ = 'GMT';

#print "\nnow die\n";
#print "done\n";

----Output of .../pf9c33q/perl-5.8.8@30127/bin/perl----

----EOF ($?='0')----
----Output of .../pwc3FWG/perl-5.8.8@30130/bin/perl----
panic: restartop

----EOF ($?='0')----

	[ 24535]
	[perl #35878] goto &xsub that croaks corrupts memory
	When an XS sub is called, a CxSUB context shouldn't be pushed. 
	goto &xs_sub mimic this behaviour by first popping the old CxSUB
	[ 24642]
	add pointer to email explaining why eval {goto &foo} is banned

Change 24642 is only a comment so I did a binary search around 24535 in 

----Output of .../ph0SWHo/perl-5.9.2@24534/bin/perl----

----EOF ($?='0')----
----Output of .../pmzeyzN/perl-5.9.2@24535/bin/perl----

----EOF ($?='0')----

----Output of .../pmzeyzN/perl-5.9.2@24535/bin/perl----

----EOF ($?='0')----
----Output of ...prQOzxg/perl-5.10.0@34126/bin/perl----

----EOF ($?='0')----

Perhaps a missing integrate in maint-5.8?

Kind regards,


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About