Skip to Content.
Sympa Menu

freetds - Re: [freetds] Status: 0.62rc2

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Status: 0.62rc2
  • Date: Mon, 05 Jan 2004 13:43:11 -0000

Il lun, 2004-01-05 alle 14:34, James K. Lowden ha scritto:
> On Mon, 5 Jan 2004 08:00:25 -0500, christos AT zoulas.com (Christos Zoulas)
> wrote:
> > On Jan 5, 9:56am, freddyz77 AT tin.it (Frediano Ziglio) wrote:
> > -- Subject: Re: [freetds] Status: 0.62rc2
> >
> > | > Note that Christos's bcp patch (thanks Christos!) has been applied,
> > | > too, but I have not tested it with TDS 5.0.
> > | >
> > |
> > | # make check
> > | ...
> > | FAIL: bcp
> > |
> > | :(
> >
> > Is the test broken? How can I run the test?
>
> It might be broken. To run it:
>
> $ vi PWD # set test server & username
> $ cd src/dblib/unittests
> $ make check #compiles and runs
> $ ./bcp
> $ gdb .libs/bcp
>
> HTH.
>

Error occurs only using Sybase.

$ gdb .libs/bcp core.4112
GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux-gnu"...
Core was generated by `.libs/bcp'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from
/home/freddy/cpp/freetds/freetds62/src/dblib/.libs/libsybdb.so.4...done.
Loaded symbols for
/home/freddy/cpp/freetds/freetds62/src/dblib/.libs/libsybdb.so.4
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /usr/lib/gconv/ISO8859-1.so...done.
Loaded symbols for /usr/lib/gconv/ISO8859-1.so
#0 0x4207c5fc in memcpy () from /lib/tls/libc.so.6
(gdb) bt
#0 0x4207c5fc in memcpy () from /lib/tls/libc.so.6
#1 0x400274bb in _bcp_add_variable_columns (dbproc=0x80500c0,
rowbuffer=0x1 <Address 0x1 out of bounds>, start=3,
var_cols=0xffffffff)
at bcp.c:1280
#2 0x4002794e in bcp_sendrow (dbproc=0x80500c0) at bcp.c:1449
#3 0x08049451 in main (argc=1, argv=0xbffff5d4) at bcp.c:234
#4 0x42015704 in __libc_start_main () from /lib/tls/libc.so.6
(gdb)

bcp_sendrow use a fixed size buffer, _bcp_add_variable_columns does not
detect null and copy from an invalid address. Both issues are really
bad...

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page