Menu

#5 sybwritetext cause core dump

open
nobody
None
5
2002-03-13
2002-03-13
Anonymous
No

this code cause bus error. ARB_TestData table
doesn't acutally exist, compare with prev line.

package require Sybtcl

set uid [lindex $argv 0]
set pw [lindex $argv 1]
set syb [sybconnect $uid $pw NYEQDRQA]
sybuse $syb EQDstore2

set textdata "Hello, world!"
sybsql $syb "update ARB_TestTable set textdata = null
where Sec_ID = 'aaaa'"
sybsql $syb "select textdata from ARB_TestTable where
Sec_ID = 'aaaa'"
sybwritetext $syb ARB_TestData.textdata 1 -variable
textdata -nolog

core trace:

(dbx) where
=>[1] CheckForStdChannelsBeingClosed(0x1, 0x20, 0x2,
0xd3, 0xffffffff, 0x2), at 0xef6d3810
[2] Tcl_Close(0x2ebe8, 0x1, 0xef718984, 0x5c824,
0x0, 0x5cb20), at 0xef6d4ac4
[3] Sybtcl_Wrtext(0xefffe8d8, 0x0, 0xef72cfb0,
0xef55ec74, 0xef55dc90, 0xef55f924), at 0xef54c78c
[4] EvalObjv(0x30360, 0x7, 0xefffe8d8, 0x0, 0xf7,
0x0), at 0xef6e7b8c
[5] Tcl_EvalEx(0xefffe8f4, 0x0, 0x279, 0x0, 0x30360,
0x1), at 0xef6e827c
[6] Tcl_EvalFile(0x30360, 0x36ca8, 0xef718984, 0x0,
0x3a6f0, 0x1), at 0xef6dd95c
[7] TclX_Eval(0x30360, 0x7, 0x36ca8, 0x30360, 0x1,
0x0), at 0xef78b0b0
[8] TclX_MainEx(0xef7a5d68, 0xefffed4c, 0x1148c,
0x30360, 0xef7a4a30, 0xef79f87c), at 0xef788758
[9] main(0x4, 0xefffed4c, 0xefffed60, 0x2e000, 0x0,
0x0), at 0x1146c

i looked in the code and it looks like Tcl_Channel
fd never been open for this case (due to i am using -
variable option). looks like Tcl_Close fails because
of that

andrei

Discussion


Log in to post a comment.

MongoDB Logo MongoDB