FW: RE: DBD::Sybase, FreeTDS, Solaris 2.7, Perl 5.6.1
camber at ais.org
Fri Oct 26 14:18:50 EDT 2001
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
> 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
> 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
More information about the FreeTDS