Skip to Content.
Sympa Menu

freetds - Re: FW: RE: DBD::Sybase, FreeTDS, Solaris 2.7, Perl 5.6.1

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: FW: RE: DBD::Sybase, FreeTDS, Solaris 2.7, Perl 5.6.1
  • Date: Fri, 26 Oct 2001 14:18:50 -0400 (EDT)


Ok, finally setup the sql7 box and had a chance to look at this

> From: "Eric Deutsch" <edeutsch AT systemsbiology.org>
> Subject: [freetds] Re: CORE DUMP - Linux - TDSVER=7.0
> Date: Fri, 10 Aug 2001 11:49:55 -0700
>
[stuff deleted]

> I found the problems which caused the seg faults in login.c and applied
> the following hacks to prevent the seg faults. This is not a proper fix,
> but more or a hack. I hope the principle authors of FreeTDS can figure
> out where the REAL problem lies and fix it there. In poking around, it
> seemed a little like the pooling code already does a similar hack? so
> maybe these problems don't occur for those using pooled connections? In
> any case, once the seg faults are prevented, the end result is:

The initial hostname should be set in tds_alloc_config and it should be
the default of the actual hostname of the client (As returned by
gethostname()). I've checked this bit in if you can try it.

> Unknown marker: 0!!
>
> and a graceful termination of the program. So, this patch doesn't cause
> the login and query to work, but at least there's no seg fault. I'm out
> of time for now. Does anyone have any ideas why the above error?

Unknown marker 0 could be caused by the SQL Server terminating the
connection on us, where we aren't catching it. I didn't have this
problem, so if you could pull the lastest copy out of CVS and give it a
try....

> thanks,
> Eric
>
>
> commentary: first seg fault is caused because config->host_name never
> gets set, so when strlen() or any other function is called on it, seg
> fault occurs. Where should login->host_name (and thus config->host_name
> get originally set?). The second seg fault occurs when the login fails
> and the tds_free_config() can be called twice, the second time causing a
> seg fault. I commented out the above tds_free_config() because it appears
> to be guaranteed that it will be called again a few lines later. An
> alternate fix might be to "return NULL" at the end of this if block..

the duplicate call to tds_free_config() has been fixed for a long time.
The config change was a big one, and we've been bitten more than once on
it.


Brian





Archive powered by MHonArc 2.6.24.

Top of Page