Skip to Content.
Sympa Menu

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

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: John <ionutz22 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] *** glibc detected *** double free orcorruption(fasttop): 0x08c919f8
  • Date: Tue, 18 Apr 2006 19:53:20 +0300

Hello Paul,

Tuesday, April 18, 2006, 5:52:02 PM, you wrote:

>> >
>> > 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...
>>

> The DBI documentation
> (http://search.cpan.org/~timb/DBI-1.50/DBI.pm#finish) suggests using
$sth->>finish on all statement handles before disconnecting. I didn't
> make the connection to the statement handle earlier because I've never
> seen that glibc error message.

I tried with that line in my script before $dbh->disconnect;, but I
get the same error/warning. If I use $sth = undef; before
$dbh->disconnect it work without this error/warning.


> Regards,
> Paul
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds


--
Best regards,
John.






Archive powered by MHonArc 2.6.24.

Top of Page