Author of:
and maintainer of:
We had an experience at $w0rk today, which took us all a bit aback.
We had an segmentation fault with one of our Perl modules - of course it had to be one of mine, so accusations were flying like rocks on N0rrebro.
Anyways, after a scheduled update of some systems, where a lot of people had not been notified, including my technical contact (I am there as a consultant), things have not been working perfectly since the weekend, but the smoke is clearing.
So today we started out with a day where everything I touched broke. I had handed over one of my applications for finalization to another consultant - and boom it exploded with a segmentation fault and a core dump.
This generated a lot of commotion, since we code pure-perl, our mod_perl trouble have long gone, or we do not see that so often anymore. So this we all had to see it.
So the all (3) of us gathered around the keyboard and came with suggestions to as what the problem could be, I think we where all equally excited over seeing something like this in Perl, we have not these for ages.
The Perl installed was a 5.8.7 with one patch and the problem seemed to be with Error an old version of Error.
This is the code giving us a hard time:
package test;
use Error qw(:try);
sub _something {
my ($self, $request, $session) = @_;
my $login = $session->{idents}->{login};
my $number = $request->{param}->{ban_number};
my $no = $request->{param}->{subscriber_no};
try {
my $test = test::Test->new(test => $login);
$result = $test->testMethod(
Number => $number;
No => $no;
);
if ($result->{code} != 0) {
throw selfservice::Exception($result->{message}, $result->{code});
}
}
}
1;
As you can see the arguments to testMethod are separated by semi-colons, which normally give you a nice syntax error, but in this case it, core dumped.
We could even get it to give us a bus error with a different combination
I have not been able to replicate it anywhere else, so I guess we just correct the syntax and update Error accordingly - we even asked a fellow Perl Monger to attempt to compile it on his 5.8.7, but without luck (this pointed us to Error).
But it was with some excitement and under some commotion we gathered around a single laptop to see perl core dump, not exactly your everyday experience.
I can reproduce it (Score:1)
yanick@enkidu ~/tmp $ perl core.pl
Segmentation fault
yanick@enkidu ~/tmp $ perl -MError -le'print $Error::VERSION'
0.15008
yanick@enkidu ~/tmp $ perl -V
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
Platform:
osname=linux, osvers=2.6.12-gentoo-r6enkidu, archname=i686-linux
uname='linux enkidu 2.6.12-gentoo-r6
Re: (Score:2)
Errorinto consideration:yanick@enkidu ~/tmp $ perl -MError -le'print $Error::VERSION'
0.15008
I wonder if it is a combination of
perlandErroror just that particular version ofErrorRe: (Score:1)