Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b4cfbb0efae25e95bbf196a49c1d0cb1a7d8ce1b
Ticket: 2910094fffffffffffffffffffffffffffffffff
[info frame] broken in coros
User & Date: andreas_kupries on 2009-12-08 02:53:54
Changes

  1. icomment:
    I confirm, using my own frame dumper (which starts from the current from down to 1, so I am able to see some output before it croaks, my code is attached here). Output is
    
    andreask@gila:~/workbench/Coro280> ./install/tcl86/bin/tclsh8.6
    % source infoframedebug.tcl
    % debugframes
    FRAME   2 {type source line 6 file infoframedebug.tcl cmd {info frame $level} proc ::debugframes level 0}
    FRAME   1 {type eval line 1 cmd debugframes level 1}
    
    % proc a {} debugframes
    % a
    FRAME   3 {type source line 6 file infoframedebug.tcl cmd {info frame $level} proc ::debugframes level 0}
    FRAME   2 {type proc line 1 cmd debugframes proc ::a level 1}
    FRAME   1 {type eval line 1 cmd a level 2}
    
    % coroutine aa a
    FRAME   5 {type source line 6 file infoframedebug.tcl cmd {info frame $level} proc ::debugframes level 0}
    FRAME   4 {type proc line 1 cmd debugframes proc ::a level 1}
    FRAME   3 {type eval line 1 cmd a}
    FRAME   2 {type eval line 1 cmd {coroutine aa a} level 2}
    bad level "1"
    % exit
    
    It seems the trouble is where it tries to access the stack frames above the coroutine invokation.
    
    The bad level is either thrown for out of range, or, for in-range numbers, if the loop in lines 1142-1148 (tclCmIL.c, rev 1.174) is not finding a frame. That would indicate that the framePtr->nextPtr chain is broken at the point of main to coro transition.
    
    This is likely managed in the code switching between coros, right ?
    
    
    
  2. login: "andreas_kupries"
  3. mimetype: "text/plain"
  4. username: "andreas_kupries"