Minor bug in STk 2.2

From: Greg A. Woods <woods_at_most.weird.com>
Date: Fri, 22 Sep 95 16:07:29 -0400 (EDT)

The following crash happened when I was trying stk-wtour, but didn't
have the startup-script configured correctly:

        ttyp7:<woods_at_most> $ ./stk-wtour
        
        *** Error:
            load: cannot open file: "/local/lib/stk/STk/init.stk"
        Current eval stack:
        __________________
        STk> (quit)
        
        *** Error:
            unbound variable: quit
        Current eval stack:
        __________________
          0 (quit)
        STk> (exit)
        ./stk-wtour: 4796 Memory fault - core dumped
        ttyp7:<woods_at_most> $ l
        CHANGES CVS/ README core lessons/ lib/ stk-wtour*
        ttyp7:<woods_at_most> $ dbx /local/bin/stk
        Reading symbolic information...
        Read 1777 symbols
        program terminated by signal SEGV (no mapping at the fault address)
        (dbx) where
        Tcl_DeleteInterp(0x0) at 0x4022
        STk_quit_interpreter(0x9f4b4) at 0x46f1
        STk_eval(0xa10bc, 0x806b8) at 0x10def
        repl_loop() at 0x293d
        repl_driver(0x3, 0xdfff738) at 0x2b6f
        STk_toplevel(0x3, 0xdfff738) at 0x2bb9
        main(0x3, 0xdfff738, 0xdfff748) at 0x22c1
        (dbx)

I fixed this with the following change:

ttyp7:<woods_at_most> $ cvs diff -c tcl-lib.c
Index: tcl-lib.c
===================================================================
RCS file: /local/src-CVS/misc/STk/Src/tcl-lib.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 tcl-lib.c
*** tcl-lib.c 1995/09/16 05:48:04 1.1.1.1
--- tcl-lib.c 1995/09/22 20:04:54
***************
*** 373,378 ****
--- 373,381 ----
    Tcl_HashSearch search;
    struct Tk_command *W;
  
+ if (!iPtr)
+ return;
+
    /* Delete result space */
    if (iPtr->appendResult != NULL) {
      ckfree(iPtr->appendResult);


-- 
							Greg A. Woods
+1 416 443-1734			VE3TCP			robohack!woods
Planix, Inc. <woods_at_planix.com>; Secrets of the Weird <woods_at_weird.com>
Received on Sat Sep 23 1995 - 03:17:29 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST