Tcl Source Code

View Ticket
Login
Ticket UUID: 986651
Title: Inifinite loop a/w bad code in while body
Type: Bug Version: obsolete: 8.4.6
Submitter: roylane Created on: 2004-07-07 15:23:09
Subsystem: 47. Bytecode Compiler Assigned To: dgp
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2004-07-07 23:21:44
Resolution: Duplicate Closed By: dgp
    Closed on: 2004-07-07 16:21:44
Description:
I've documented the problem, including a simple code
example, in the attached file.  The code example
contains an error within a while loop.  When the code
is run, Tcl goes into an infinite loop.  The bytecode
compiler detects the error when trying to inline
compile the while body and it attempts to back out and
switch to outline compile.  However, a fragment of the
compiled bytecode for the while remains and this is
what causes the infinite loop.

This isn't a major problem because this occurs when
there's an error in user code and it only occurs under
certain conditions.    The problem is that when a user
hits this (like me), there's no clue as to what's going
on.  I thought it would be useful to document this and
perhaps there's a simple fix.

Tcl 8.4.6
Red Hat Linux (kernel 2.4.9)
(same behavior on Windows, as would be expected)
User Comments: dgp added on 2004-07-07 23:21:44:
Logged In: YES 
user_id=80530


Looks like a duplicate of Bugs
705496 and 916795.  Already
fixed for 8.4.7.

roylane added on 2004-07-07 22:23:10:

File Added - 93133: tcl_bug.txt

Attachments: