Re: XML-Writer install failure with Perl 5.6
by John Escott other posts by this author
Aug 24 2000 10:36AM messages near this date
view in the new Beta List Site
Re: [Fwd: CPAN Upload: R/RB/RBS/XML-AutoWriter-0.32.tar.gz]
|
Re: Breakage in XML::Parser
> I'm trying to install XML-Writer on a linux machine with Perl 5.6 installed.
> I keep getting a core dump during test #40:
>
> ok 37
> ok 38
> ok 39
> Attempt to free unreferenced scalar at test.pl line 513.
> make: *** [test_dynamic] Segmentation fault (core dumped)
> /usr/bin/make test -- NOT OK
I had a similar problem with XML-Writer version 0.4 (not quite sure what
the current version is), also with perl5.6.0 and also in test 40.
Slightly different error message though:
Not an ARRAY reference at blib/lib/XML/Writer.pm line 905.
not ok 40
sh: 2896 Memory fault(coredump)
*** Error exit code 139
Stop.
I was told this was a problem in perl5.6 (so maybe it will be fixed in
5.7 as Matt Sergeant has suggested):
A segmentation fault occurs when die is called in an eval-wrapped
nest of subroutine calls where, along the way, a reference to an
implied argument array is stored and all of this this is executed
for the 2nd time.
Note that this does not occur if either the reference is not
stored (1) or the parameter array @_ is passed explicitly (2).
Applying the following diffs (to XML-Writer-0.4) fixed it for me (beware
or line-wrapping):
*** Writer.pm.orig Wed Jun 7 19:08:38 2000
--- Writer.pm Wed Jun 7 19:29:04 2000
***************
*** 797,803 ****
$self-> {STARTTAG} = sub {
my $name = $_[0];
unless ($unsafe) {
! _checkNSNames(\@_);
}
&{$pushState}();
&{$nsProcess}(\@_);
--- 797,805 ----
$self-> {STARTTAG} = sub {
my $name = $_[0];
unless ($unsafe) {
! # Perl 5.6.0 crashes if \@_ is passed to _checkNSNames here, so
make temp copy and pass that
! my @a = @_;
! _checkNSNames(\@a);
}
&{$pushState}();
&{$nsProcess}(\@_);
***************
*** 810,816 ****
#
$self-> {EMPTYTAG} = sub {
unless ($unsafe) {
! _checkNSNames(\@_);
}
&{$pushState}();
&{$nsProcess}(\@_);
--- 812,820 ----
#
$self-> {EMPTYTAG} = sub {
unless ($unsafe) {
! # Perl 5.6.0 crashes if \@_ is passed to _checkNSNames here, so
make temp copy and pass that
! my @a = @_;
! _checkNSNames(\@a);
}
&{$pushState}();
&{$nsProcess}(\@_);
Best regards, John Escott.
|