Skip to Content.
Sympa Menu

freetds - RE: configure.in check for long long

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Varley, David(CBorn at Alcoa)" <David.Varley AT alcoa.com.au>
  • To: 'TDS Development Group' <freetds AT franklin.oit.unc.edu>
  • Subject: RE: configure.in check for long long
  • Date: Fri, 9 Aug 2002 15:29:09 +0800



Brian,

On tracing tsql, I found the segfault coming from line 874 in convert.c :

tds_strftime( whole_date_string, sizeof(whole_date_string),
tds_ctx->locale->date_fmt, &when );

due to tds_ctx being NULL at the time.

David

-----Original Message-----
From: Varley, David(CBorn at Alcoa) [mailto:David.Varley AT alcoa.com.au]
Sent: Friday, 9 August 2002 2:59 PM
To: TDS Development Group
Subject: [freetds] RE: configure.in check for long long


Hi Brian,

I grabbed those changes and did a clean build on Tru64.
The build went ok, although it now tells me I have no type __int64,
and also that __int64 is of size 0. And that I have a long long.

Testing
-------

t0004 still fails

sqsh (and tsql) still take >30 seconds to make the connection.
In the all_types query, the _text entry still comes up empty or garbage

Querying my simple "Changes" table works from sqsh, but from tsql it dumps
core, as follows:

Segmentation fault at [tds_convert_datetime:6 +0x1c60,0x3ffbffef6a0]

Running a "select @@version" from tsql works ok.

Sorry I can't look further into this just now but I'm due somewhere else...

David


-----Original Message-----
From: Brian Bruns [mailto:camber AT ais.org]
Sent: Friday, 9 August 2002 1:50 PM
To: TDS Development Group
Subject: [freetds] configure.in check for long long


Hi all,

I've added a check for long, long long, and __int64 to configure.in and
made the typedef in tds.h.in a substituted value based on that.

If there is no 64bit integer type on the box we default to whatever "long"
is, so there is a potential for buffer overflows where the size of
TDS_INT8 is assumed within the code, so I've added a HAVE_INT64 macro such
that we can test for that and handle it gracefully (although I haven't
modified any of the mainline code to check it yet). Thinking about it, I
maybe should have made the unsupported value "double" so the sizes matched
anyway, not sure.

So, based on this and jkl's HAVE_ATOLL fixes, Tru64 should work again (I
think).

We can turn off certain features if 64bit ints aren't supported on a
platform (like support for SYBINT8 datatypes under TDS 8.0, or some types
of money conversions even), but I would hope we can at least compile and
run without crashing.

Brian

PS tsql was broken from the convert changes, i fixed it too.



---
You are currently subscribed to freetds as: [David.Varley AT alcoa.com.au]
To unsubscribe, forward this message to
$subst('Email.Unsub')

---
You are currently subscribed to freetds as: [David.Varley AT alcoa.com.au]
To unsubscribe, forward this message to
$subst('Email.Unsub')




Archive powered by MHonArc 2.6.24.

Top of Page