Skip to Content.
Sympa Menu

freetds - Re: DBD::Sybase main.t crash

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT umcc.ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: DBD::Sybase main.t crash
  • Date: Mon, 30 Aug 1999 13:14:45 -0400 (EDT)



Ok, we are all checked in and working under Solaris. main.t passes all
the tests, and every thing appears to be good. So what's next on the
not-working list ? :)


Brian

On Sun, 29 Aug 1999, Brian Bruns wrote:

>
> Ok, the server message is a red herring (it needs to be fixed but its not
> causing this problem). The reason ct_describe() is failing is that its
> getting called for column #5 (which doesn't exist) and the reason for that
> is a bad cast in ct_res_info when requesting the number of columns (This is
> a long standing bug that just happens to work on little endian
> machine....copying 4 bytes when there are only 2 but the last two are zero,
> so the integer still has the correct number. On big endian the zeros are
> now the low order bytes and the number of columns returned is VERY large).
> Anyway, this is fixed and checked in.
>
> Except now we get a bus error. Which looks like an alignment problem. The
> offending code is (in convert.c):
>
> any.i = *((TDS_SMALLINT *) src);
>
> where 'any' is a union of a bunch of types, 'i' is a 32 bit int and 'src'
> is a 'unsigned char *'. When replaced by the following (endian specific)
> code it works:
>
> any.i = src[0]*256+src[1];
>
> (long)src % 4 yields 1 so what DBD::Sybase passes really is unaligned.
> *sigh*
> So, it seems long ago I made a very bad assumption and now I've got to
> replace all these casts with something else.
>
> Well that may be a job for tommorow :)
>
> BTW main.t does actually pass all tests on Solaris with the above hack.
>
> Brian
>
> On 08/26/99, "Michael Peppler <mpeppler AT peppler.org>" wrote:
> > OK - now on Solaris 7, Sparc...
> >
> > I've made sure that HW_BIG_ENDIAN is defined.
> >
> > However, I get:
> >
> > kiruna (10:33AM):123 > perl -Mblib t/main.t
> > Using /u6/home/mpeppler/src/Sybase-dist/DBD-Sybase-0.19/blib
> > 1..12
> > ok 1
> > Switch: DBI-1.08 Switch by Tim Bunce, 1.08
> > Available Drivers: ADO, ExampleP, Proxy, Sybase
> > Unknown property 7
> > ok 2
> > ok 3
> > ct_describe() failed at t/main.t line 61.
> > 3805:
> > Server message number=3805 severity=18 state=1 line=1 text=The token
> > datastream length was not correct. This is an internal protocol error.
> > not ok 4
> > not ok 5
> > zsh: segmentation fault (core dumped) perl -Mblib t/main.t
> >
> > I'll try to run the whole thing in the debugger, but there seems to be
> > several problems here...
> >
> > I may spend some more time on this, but you may be interested in
> > seeing this :-)
> >
> > Michael
> >





Archive powered by MHonArc 2.6.24.

Top of Page