[Xotcl] two crashy issues // 1.5.x

Gustaf Neumann neumann at wu-wien.ac.at
Mon Jul 23 20:09:59 CEST 2007


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
>



More information about the Xotcl mailing list