Subject: | abort core dumped in /usr/lib/perl5/auto/XML/Parser/Expat/Expat.so |
This program causes perl to crash in Expat.so on my Debian machine.
#!/usr/bin/perl -wT
use warnings;
use strict;
use diagnostics;
use LWP::Simple;
use DBI;
my $dbh = DBI->connect('dbi:AnyData(RaiseError => 1):');
my $content =
get('http://www.concert-bands.co.uk/cgi-bin/cb-links.pl?xml=1');
$dbh->func('bands', 'XML', [$content], 'ad_import');
my $sth = $dbh->prepare("SELECT site, page FROM bands");
$sth->execute();
while(my @row = $sth->fetchrow_array()) {
if($row[0] =~ /^sites\.google\.com\/site\//) {
print 'https://';
} else {
print 'http://';
}
if(defined($row[1])) {
print "$row[0]/$row[1]\n";
} else {
print "$row[0]/\n";
}
}
The stack trace is:
*** glibc detected *** /usr/bin/perl: realloc(): invalid pointer:
0x000000000360e5e0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x75b76)[0x7f44dff96b76]
/lib/x86_64-linux-gnu/libc.so.6(+0x7bfa5)[0x7f44dff9cfa5]
/usr/lib/libperl.so.5.14(Perl_safesysrealloc+0x10)[0x7f44e09dbc20]
/usr/lib/perl5/auto/XML/Parser/Expat/Expat.so(+0x105eb)[0x7f44dd2e55eb]
/lib/x86_64-linux-gnu/libexpat.so.1(+0xae6c)[0x7f44dd091e6c]
/lib/x86_64-linux-gnu/libexpat.so.1(+0xbc61)[0x7f44dd092c61]
/lib/x86_64-linux-gnu/libexpat.so.1(+0x8ad7)[0x7f44dd08fad7]
/lib/x86_64-linux-gnu/libexpat.so.1(+0xa48b)[0x7f44dd09148b]
/lib/x86_64-linux-gnu/libexpat.so.1(XML_ParseBuffer+0x6d)[0x7f44dd094a6d]
/usr/lib/perl5/auto/XML/Parser/Expat/Expat.so(XS_XML__Parser__Expat_ParseString+0x115)[0x7f44dd2dac85]
/usr/lib/libperl.so.5.14(Perl_pp_entersub+0x58c)[0x7f44e0a0245c]
/usr/lib/libperl.so.5.14(Perl_runops_standard+0x16)[0x7f44e09f99b6]
/usr/lib/libperl.so.5.14(+0xe829c)[0x7f44e0a3229c]
/usr/lib/libperl.so.5.14(Perl_runops_standard+0x16)[0x7f44e09f99b6]
/usr/lib/libperl.so.5.14(Perl_call_sv+0x139)[0x7f44e0995429]
/usr/local/lib/perl/5.14.2/auto/DBI/DBI.so(XS_DBI_dispatch+0x17b2)[0x7f44de675f52]
/usr/lib/libperl.so.5.14(Perl_pp_entersub+0x58c)[0x7f44e0a0245c]
/usr/lib/libperl.so.5.14(Perl_runops_standard+0x16)[0x7f44e09f99b6]
/usr/lib/libperl.so.5.14(Perl_call_sv+0x139)[0x7f44e0995429]
/usr/local/lib/perl/5.14.2/auto/DBI/DBI.so(XS_DBI_dispatch+0x17b2)[0x7f44de675f52]
/usr/lib/libperl.so.5.14(Perl_pp_entersub+0x58c)[0x7f44e0a0245c]
/usr/lib/libperl.so.5.14(Perl_runops_standard+0x16)[0x7f44e09f99b6]
/usr/lib/libperl.so.5.14(perl_run+0x3a5)[0x7f44e099b585]
/usr/bin/perl(main+0x149)[0x400f89]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7f44dff3fead]
/usr/bin/perl[0x400fc1]