Hi, I've been talking with the upstream XMLTV maintainer about this RedHat bug: http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=114271 Using the Perl code from the RedHat bug report, I can reproduce this bug in Debian, as well. (I've attached the Perl code from the bug report. To see the results for yourself, put test_program and test_library in the same directory and run 'perl test_program'.). With perl and libxml-parser-perl from woody, I get this result: Undefined subroutine &main::foo called at test_program line 7. Attempt to free unreferenced scalar during global destruction. With perl and libxml-parser-perl from unstable, I get this result: Undefined subroutine &main::foo called at test_program line 7. Attempt to free unreferenced scalar: SV 0x817545c during global destruction. The "undefined subroutine" error message is expected. The "unreferenced scalar" error message is worrisome. Obviously there's something strange going on here. Anyone have an opinion about whether the bug is in XML::Parser or Perl itself? I'd like to file it in the right place initially, and I'm at a bit of a loss right now. Thanks, KEN -- Kenneth J. Pronovici <pronovic@debian.org>
#!/usr/bin/perl require 'test_library'; new Fred(Key => { '/a' => sub { my ($t, $node) = @_; foreach ($node->children()) { map { foo() } 1; } }, })->parse('<a>x</a>');
package Fred; use XML::Parser; @ISA = qw(XML::Parser); sub new { my ($class, %args) = @_; my $handlers; $self = XML::Parser->new(); $handlers= $args{Key}; my $path = (keys %$handlers)[0]; $self->setHandlers( Start => sub { $handlers->{$path}->($p->{twig}, 'Fred::Foo'->bar($gi)); }, ); $self->{twig}= $self; } package Fred::Foo; sub bar { my $class= shift; } sub children { my $elt= shift; }
Attachment:
pgpdCPcwcIYF0.pgp
Description: PGP signature