[freetds] blk_in error

Lowden, James K LowdenJK at bernstein.com
Mon Jul 26 12:28:31 EDT 2004


> From: ZIGLIO, Frediano, VF-IT
> Sent: Monday, July 26, 2004 11:05 AM
> 
> blk_in test (ctlib) produce this core
..
> (gdb) bt
> #0  0x4000a0da in cs_convert (ctx=0x804c570, srcfmt=0x0, 
                                            looks odd ^^^
> srcdata=0x804adc0, destfmt=0xbffff780, destdata=0x0,
> resultlen=0xbffff77c) at cs.c:604
> #1  0x4000cfe3 in _blk_get_col_data (blkdesc=0x4000a0ce, 
> bindcol=0x8092600, offset=0) at blk.c:1580 
> #2  0x4000c509 in 
> _blk_build_bcp_record (blkdesc=0x804d438, offset=0,
> record_len=0x4000a0ce) at blk.c:1148
> #3  0x4000b97f in _blk_rowxfer_in (blkdesc=0x804d438, rows_to_xfer=1,
> rows_xferred=0xbffff988) at blk.c:719
> #4  0x4000b6fc in blk_rowxfer_mult (blkdesc=0x804d438,
> row_count=0xbffff9b0) at blk.c:559
> #5  0x4000b67e in blk_rowxfer (blkdesc=0x804d438) at 
> blk.c:540 #6  0x0804912d in main (argc=1, argv=0xbffffa34) at 
> blk_in.c:265

Works for me using TDS 8.0 or 7.0:

$ ./blk_in
../../../../src/ctlib/unittests/blk_in.c: Retrieve data using array
binding
Sending same row 10 times...
10 rows copied.
done

AFAICT, _blk_get_col_data() cannot pass a null srcfmt pointer to
cs_convert().  The call is:

	if ((result = cs_convert(ctx, &srcfmt, (CS_VOID *) src,

The backtrace shows srcfmt=0x0, so I suspect stack corruption in
cs_convert().  

--jkl
	

-----------------------------------------
The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message. Please note that we do not accept account orders and/or instructions by e-mail, and therefore will not be responsible for carrying out such orders and/or instructions.
If you, as the intended recipient of this message, the purpose of which is to inform and update our clients, prospects and consultants of developments relating to our services and products, would not like to receive further e-mail correspondence from the sender, please "reply" to the sender indicating your wishes.  In the U.S.: 1345 Avenue of the Americas, New York, NY 10105.





More information about the FreeTDS mailing list