Mk4tcl frequently segfaults on exit

As one interactively explores the commands, documented and undocumented, provided by Mk4tcl, it is distressingly easy to create a segfault.

It's possible these are not problems with normal Mk4tcl usage, but they pop up all the time when trying to reverse engineer documentation by trial and error messages.

It appears that this is mostly due to a lack of checking for valid arguments in the processing of the Tcl commands provded by Mk4tcl rather than any instability deep in the Metakit library itself. It seems that the Mk4tcl package itself needs substantial QA work.

I also notice that I see these segfaults on Linux, but not on Solaris. In other work with Tcl, I often see memory corruption problems on Linux that I do not see on other platform, because I think Linux tends to re-use freed memory more quickly.


Examples

   % mk::cursor create X
   _._!1._!0
   % mk::cursor create X
   _._!1._!0
   % exit
   Segmentation fault

   % mk::view open non-existent.view
   view0
   % exit
   Segmentation fault

Hm, I'm starting to think that MK has problems with exit after any error message, even if properly detected and reported. -JCW

5/9/2002 - I cannot make the crash happen on Linux with MK 2.4.7 for either of the above two cases, they just exit when I try them (but I did get a crash on the last one with older builds) -JCW

Whoops... but with tclkit it still crashes. One difference is the fact that tclkit uses non-stubs builds (it's a static build of MK). Weird & worrying... :(