Skip to Content.
Sympa Menu

freetds - Re: [freetds] *** glibc detected *** double free or corruption(fasttop): 0x08c919f8

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "John" <ionutz22 AT gmail.com>, "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] *** glibc detected *** double free or corruption(fasttop): 0x08c919f8
  • Date: Tue, 18 Apr 2006 09:36:31 +0200

>
> Hi,
>
> I have the following installed on my system.
>
> OS - CentOS 4.3 i386
> DBI - 1.40
> DBD::Sybase - 1.07
> FreeTDS - 0.63
> ASE - Adaptive Server Enterprise/12.5.3/EBF 13204
> ESD#6/P/Linux
>
> I have a small perl script that runs without problems with this
> configuration or when I use Open Client libraries instead of FreeTDS.
> The script is:
>
> #!/usr/bin/perl -w
> use strict;
> use DBI;
> my ($dbh,$sql,$sth);
> $dbh = DBI->connect("dbi:Sybase:server=bbox","sa","");
> $dbh->do("use master");
> $sth=$dbh->prepare("select name from sysobjects where
> type='U' order by name");
> $sth->execute;
> my @tables=();
> while (my @r=$sth->fetchrow()){
> push(@tables,$r[0]);
> print "@r\n";
> }
> $dbh->disconnect;
> print "done\n";
> 1;
>
> I upgraded FreeTSD to 0.64RC2 and my scripts runs OK (I get my
> results) but I get the following error/warning:
>
> <snip>
> done
> *** glibc detected *** double free or corruption (fasttop):
> 0x08b6c9e0 ***
> Aborted
> </snip>
>
> I get the same error if I use FreeTDS current snapshot. I
> also get the error
> with the following configuration.
>
> OS - CentOS 4.3 x86_64
> DBI - 1.40
> DBD::Sybase - 1.07
> FreeTDS - 0.64RC2 or current snapshot
> ASE - Adaptive Server Enterprise/12.5.3/EBF 13204
> ESD#6/P/Linux
>
> If I comment out the line containing "$dbh->disconnect;" the script
> doesn't generate this warning/error.
>
> Did anyone encountered this kind of problem ? Can it be fixed ?
> Thanks for any direction you can provide.
>

Adding a

$sth = undef;

before disconnect will remove the problem. The reason is that
$dbh->prepare allocate a CS_COMMAND which is destroyed on ct_con_drop
(called at $dbh->disconnect) so when $sth is freed is still use a freed
pointer... Now the problem is; what's the right behavior? I think
however that right behavior is Sybase one...

freddy77



  • Re: [freetds] *** glibc detected *** double free or corruption(fasttop): 0x08c919f8, ZIGLIO, Frediano, VF-IT, 04/18/2006

Archive powered by MHonArc 2.6.24.

Top of Page