Tcl Source Code

View Ticket
Login
Ticket UUID: 1743948
Title: TclCheckInterpTraces cycles
Type: Bug Version: obsolete: 8.4.11
Submitter: eugene_cdn Created on: 2007-06-27 02:04:22
Subsystem: 46. Traces Assigned To: dgp
Priority: 5 Medium Severity:
Status: Deleted Last Modified: 2007-06-27 09:42:46
Resolution: Duplicate Closed By: eugene_cdn
    Closed on: 2007-06-27 02:06:07
Description:
OS: Solaris 9, Linux RH 4U3

On certain order of two Tcl_CreateTrace calls, TclCheckInterpTraces never returns on evaluation of a non-trivial commands. Certain order is first trace is of depth "1", and second one is of depth "5" or more on Solaris and "1" on Linux. It cycles in this loop
   for ( tracePtr = iPtr->tracePtr;
      (traceCode == TCL_OK) && (tracePtr != NULL);
           tracePtr = active.nextTracePtr) {
with the same value of tracePtr.

Expected behavior: should not cycles.

See attached testcase. Need to build it
   gcc -o libtrace.so -g -shared -fPIC trace.c -I...
and then
   > tclsh
   tclsh> load libtrace.so
After a while it hangs. If you switch the order (depth) of traces, it works on Solaris.
It does not matter which file to evaluate. It must be non-trivial.
Good luck!
User Comments: eugene_cdn added on 2007-06-27 09:09:38:
Logged In: YES 
user_id=518794
Originator: YES

For sure, I did not create this copy of the bug. I clicked refresh on bug list page. See #1743941.

eugene_cdn added on 2007-06-27 09:04:25:

File Added - 234689: trace.c

Attachments: