[freetds] Help me. Core dump with dbopen when FreeTDS on Solaris 8

Michael Peppler mpeppler at peppler.org
Thu Aug 26 07:42:18 EDT 2004

On Thu, 2004-08-26 at 11:07, ldai wrote:
> On Tue, 24 Aug 2004 11:05:26 +0800, ldai wrote
> > Hi,everybody:
> >    I have met a strange problem with freetds's db-lib.
> >    I am only to do connecting sqlserver operation in solaris 8. When 
> > my code ran more than 2 days. I got a bus error.   I found bus error 
> > would occur when calling dbopen and didn't return any value.

> #0  tdsdbopen (login=0xffffffff, server=0x5bf33120 "lwb") at dblib.c:941
> 941             tds_set_server(login->tds_login, server);

well - for whatever reason you are passing a value of 0xffffffff (or -1)
as the address for "login". Obviously when freetds tries to access the
pointer you get the error (bus error, in this case.)

Try running your program in the debugger to see what values for "login"
get returned and passed in to dbopen().

Michael Peppler                              Data Migrations, Inc.
mpeppler at peppler.org                       http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short
or long term contract positions - http://www.peppler.org/resume.html

More information about the FreeTDS mailing list