core dump in 8.5.4 using SQLite ... more info




I'm having difficulty with SQLite 3.6.1 and Tcl 8.5.4, essentially the script runs to completion, correctly I might add, but upon termination, I get a core dump on FreeBSD 7.0Release. Tcl 8.4 has no such problems with the same script.

I rebuilt tclsh using the following configure script (to retain the symbols, and I include both the script and the gdb traceback ...
../configure --enable-shared --enable-symbols --disable-threads)

It appears that Tcl is attempting to "unload" the libtclsqlite3.so library upon termination, and stumbles ... Has anyone seen this behaviour?? Oh, and an explicit unload of the library file fails with a message;

file "/usr/local/lib/libtclsqlite3.so" cannot be unloaded under a trusted interpreter
while executing
"unload /usr/local/lib/libtclsqlite3.so "

The traceback shows that TclEvalObjvInternal appears to be called from TclExecuteByteCode with some bad arguments. Surely this can't be good.

Am I doing something wrong??

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
load /usr/local/lib/libtclsqlite3.so set wd /usr/home/rob/xyzzy
set dbf [file join $wd inventory.sq3]

sqlite3 db $dbf
db eval { select * from person ;} vx {
parray vx
}
db close

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

#0 0x282c99c0 in ?? ()
#1 0x2804f918 in dlopen () from /libexec/ld-elf.so.1
#2 0x2804e520 in dlclose () from /libexec/ld-elf.so.1 #3 0x28183063 in TclpUnloadFile (loadHandle=0x28077800) at /u0/sw/Tcl/tcl8.5.4/unix/../unix/tclLoadDl.c:188
#4 0x28137652 in TclFinalizeLoad () at /u0/sw/Tcl/tcl8.5.4/unix/../generic/tclLoad.c:1156 #5 0x280f9a95 in Tcl_Finalize () at /u0/sw/Tcl/tcl8.5.4/unix/../generic/tclEvent.c:1080
#6 0x280f98f1 in Tcl_Exit (status=0) at /u0/sw/Tcl/tcl8.5.4/unix/../generic/tclEvent.c:828 #7 0x280af090 in Tcl_ExitObjCmd (dummy=0x0, interp=0x28317800, objc=2, objv=0x28322040) at /u0/sw/Tcl/tcl8.5.4/unix/../generic/tclCmdAH.c:727
#8 0x280a397a in TclEvalObjvInternal (interp=0x28317800, objc=2, objv=0x28322040,
command=0xffffffff <Address 0xffffffff out of bounds>, length=-1, flags=0) at /u0/sw/Tcl/tcl8.5.4/unix/../generic/tclBasic.c:3690
#9 0x280fd303 in TclExecuteByteCode (interp=0x28317800, codePtr=0x28379080)
at /u0/sw/Tcl/tcl8.5.4/unix/../generic/tclExecute.c:2340
#10 0x280fb094 in TclCompEvalObj (interp=0x28317800, objPtr=0x28338150, invoker=0x0, word=0)
at /u0/sw/Tcl/tcl8.5.4/unix/../generic/tclExecute.c:1474
#11 0x280a5777 in TclEvalObjEx (interp=0x28317800, objPtr=0x28338150, flags=131072, invoker=0x0, word=0)
at /u0/sw/Tcl/tcl8.5.4/unix/../generic/tclBasic.c:5095
#12 0x280a537b in Tcl_EvalObjEx (interp=0x28317800, objPtr=0x28074a04, flags=131072)
at /u0/sw/Tcl/tcl8.5.4/unix/../generic/tclBasic.c:4903
#13 0x2813852e in Tcl_Main (argc=-1, argv=0xbfbfea60, appInitProc=0x8048640 <Tcl_AppInit>)
at /u0/sw/Tcl/tcl8.5.4/unix/../generic/tclMain.c:665
#14 0x08048628 in main (argc=-716130182, argv=0x1) at /u0/sw/Tcl/tcl8.5.4/unix/../unix/tclAppInit.c:87

---- Posted via Pronews.com - Premium Corporate Usenet News Provider ----
http://www.pronews.com offers corporate packages that have access to 100,000+ newsgroups
.



Relevant Pages

  • Re: a new language? was (Re: is tcl/tk dying out?!)
    ... I've written an OO environment that uses an sqlite backend. ... Pure Tcl script using namespaces, minimal memory footprint, ... will happily read legacy Incr Tcl code. ...
    (comp.lang.tcl)
  • Re: Howto break running tcl script (Tcl_EvalFile)?
    ... you expect to trigger the termination of the script ... script with while - I just want to break this execution. ... but I have to be sure that script execution will be finished. ... start tcl in a different process and pass stuff with sockets. ...
    (comp.lang.tcl)
  • Re: Key-passing from PHP to TCL CGI script - how is it done (web security issue)?
    ... TCL v.8.3 ... set hasEnteredTrivia 0 ... # NEW 8/7/2004 USE PHP (AS CGI) TO CHECK IF USER IS ATTEMPTING TO ENTER ... # USE REMOTE PHP SCRIPT TO CHECK FOR REPOSTING ...
    (comp.lang.tcl)
  • embedded Tcl performance -- how to make it faster?
    ... My application already provides a limited scripting language to our ... I set off to embed Tcl. ... (Embedded Ruby ... and then retrieve results back in the app once the script ...
    (comp.lang.tcl)
  • Expect: interact and buffering?
    ... with the tcl application and terminated it. ... remaining output would display and the Expect script would end. ... I have changed the interact in an attempt to make it process character ...
    (comp.lang.tcl)