Menu

#119 Throwing an error from within an itcl::ensemble causes a segmentation fault (core dump)

4.0.0
closed-fixed
None
5
2018-02-14
2018-02-12
No

Using a build from ActiveState, if I throw an error from inside an itcl::ensemble, the interpreter core dumps. This is very easy to reproduce - simply source this file and you get a crash.

!/bin/sh

#--Tcl-- the next line restarts using tclsh \
exec tclsh "$0" "$@"

package require Tcl 8.6.7
package require Itcl 4.1.0

itcl::ensemble myensemble part dothing {args} {
error "wait, what?"
}

myensemble dothing here

core dump

Yes, I realize that [namespace ensemble] is now a thing, but I am transitioning from Tcl 8.4 to 8.6, and I do not have namespace ensemble available. Our entire code base is now subject to this crazy bug.

Discussion

  • Don Porter

    Don Porter - 2018-02-13

    Itcl_InvokeEnsembleMethod is failing to set a ProcErrorProc.

     
  • Trey Jackson

    Trey Jackson - 2018-02-13

    Is there a way to work around this issue temporarily?

     
  • Don Porter

    Don Porter - 2018-02-13

    By all appearances, in the entire Itcl 4 development history, this just hasn't been done. I suspect it's not hard to do, but I'm not ready to predict a completion date.

    You can keep using Itcl 3.4.4 with Tcl 8.6 in the meantime.

     
  • Don Porter

    Don Porter - 2018-02-14
    • status: open --> closed-fixed
    • assigned_to: Don Porter
     
  • Don Porter

    Don Porter - 2018-02-14

    Fixed for Itcl 4.1.2

     

Log in to post a comment.

MongoDB Logo MongoDB