Tcl Source Code

View Ticket
Login
Ticket UUID: 2815500
Title: enabling dtrace breaks error handling
Type: Bug Created on: 2009-07-01 23:34:03
Submitter: ollystephens Assigned to: das
Subsystem: 55. Other Tools Severity:
Priority: 5 Medium Last modified: 2009-07-02 15:44:30
Status: Open Closed by:
Resolution: None Closed on:
Version: obsolete: 8.5.7
Description:
On Solaris 10, compiling 8.5.7 using gcc 3.4.6, it produces a version of TCL which passes all tests.  Good so far.  But if I add --enable-dtrace to the configure line, it produces a version of TCL which fails virtually all tests.  Reason is that it is somehow stopping it from handling error codes properly.  This is a trivial example of the problem:

-bash-3.00$ tclsh
% info patchlevel
8.5.7
% proc bad {} { error bad }
% catch bad
0
% exit

As you can see, it thinks that the bad procedure completed successfully.  Other than this rather fatal flaw, the interpreter works well and the dtrace functionality works too.  But it's not usable for anything serious because of this problem, which is a shame.
User Comments:
das added on 2009-07-02 07:08:16:
What is the version of Solaris 10 and the DTrace version where you see this?

FWIW, I do not see this on Mac OS X with DTrace enabled:

$ tclsh
% info patchlevel
8.5.7
% proc bad {} {error bad}
% catch bad
1
% tcl::dtrace
% exit
$ dtrace -V
dtrace: Sun D 1.6.2

ollystephens added on 2009-07-02 15:44:30:
$ dtrace -V
dtrace: Sun D 1.3
$ uname -a
SunOS gb-connect-standby.cambridge.arm.com 5.10 Generic_137137-09 sun4u sparc SUNW,Sun-Fire-V240

I'll ask my admin to make sure it's fully patched, just in case.