I attached two scripts, each reproducing bugs I found with most recent versions of XOTcl (1.5.2/1.5.3).
Bug -1-: Argument declarations to proc/instproc containing a single empty tcl string yield a segfault/bus error.
Bug -2-: Nesting objects through per-object evals (evals in the object scope) yields segfaults/bus errors under certain conditions.
all the best,
//stefan
Hi there! I don't know if the following information will help or will create more confusion.
I'm using XOTcl 1.5.3 compiled from scratch against Tcl 8.4.5. I've been able to reproduce the bug using the tcl shell installed on my system (info patchlevel ==>8.4.9).
Surprisingly, everything works fine if I source your scripts in the Tcl shell embedded in the commercial software I'm working with (info patchlevel ==> 8.4.5.1).
Object o o eval {set x [::xotcl::self]} o set x o eval {set x [::xotcl::self]::nested} o set x set cmd {::xotcl::Object [::xotcl::self]::nested} o eval $cmd
RETURNS /> ::o::nested
II'm at your disposal for providing you any additional info you might find interesting if you believe this could give hints for debugging,
Regards, Nico
Stefan Sobernig wrote:
I attached two scripts, each reproducing bugs I found with most recent versions of XOTcl (1.5.2/1.5.3).
Bug -1-: Argument declarations to proc/instproc containing a single empty tcl string yield a segfault/bus error.
Bug -2-: Nesting objects through per-object evals (evals in the object scope) yields segfaults/bus errors under certain conditions.
all the best,
//stefan
Xotcl mailing list Xotcl@alice.wu-wien.ac.at http://alice.wu-wien.ac.at/mailman/listinfo/xotcl
Stefan and all,
Many thanks for the test cases. Below is the bug-fix for the empty argument. Concerning bug#2: i think you sent me the same bug (with a different testfile) on march 15, i have sent you a fix back on march 16.
i will put togehter today a bugfix version containing the fixes developed over the last months for testing for Ben to see, if this helps already for his crashes. Maybe the fix for bug2 helps already.
-gustaf
% diff -u generic/xotcl.c-old generic/xotcl.c --- generic/xotcl.c-old 2007-07-23 19:47:21.000000000 +0200 +++ generic/xotcl.c 2007-07-23 19:45:30.000000000 +0200 @@ -5049,7 +5049,7 @@ /* arg = ObjStr(argsv[i]); fprintf(stderr, "*** argparse0 arg='%s'\n",arg);*/ rc = Tcl_ListObjGetElements(in, argsv[i], &npac, &npav); - if (rc == TCL_OK) { + if (rc == TCL_OK && npac > 0) { arg = ObjStr(npav[0]); /*fprintf(stderr, "*** argparse1 arg='%s' rc=%d\n",arg,rc);*/ if (*arg == '-') {
Stefan Sobernig schrieb:
I attached two scripts, each reproducing bugs I found with most recent versions of XOTcl (1.5.2/1.5.3).
Bug -1-: Argument declarations to proc/instproc containing a single empty tcl string yield a segfault/bus error.
Bug -2-: Nesting objects through per-object evals (evals in the object scope) yields segfaults/bus errors under certain conditions.
all the best,
//stefan
Concerning bug#2: i think you sent me the same bug (with a different testfile) on march 15, i have sent you a fix back on march 16.
Gosh, this is so true. I simply forgot about patching it in the last time i set up xotcl ...
Many thanks for your quick response and your efforts to assemble a bug-fix release.
best //stefan