Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: dec39fbea52d80157a10bad53bae2bb04a1cdb68
Ticket: 3072640fffffffffffffffffffffffffffffffff
trace execution + yield fails ASSERT
User & Date: twylite on 2010-09-21 13:08:03
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Adding an execution (enterstep) trace to a proc that yields causes an ASSERT to fail, crashing the interp.
    
    Environment: 
    - x86 32 bit
    - Windows XP SP3 with latest patches
    - Tcl 8.6b1.2 (from CVS 2010/08/30), also appears in Tcl 8.6b1.1)
    
    Symptom:
    - Assertion failed (MS Visual C++ Runtime Library error popup)
    - Source of failure: tclExecute.c:2882 NRE_ASSERT(BP == corPtr->eePtr->bottomPtr);
    
    Code to reproduce:
    --
      proc generate {n} {
        for {set i 0} {$i < $n} {incr i} {
          yield $i
        }
      }
      proc t {args} { puts "Trace: $args" }
      trace add execution ::generate enterstep ::t
      coroutine coro generate 5
    --
    
    Further information:
    - Putting the [yield] into the trace handler ::t rather than the proc being traced results in the error "cannot yield: C stack busy", but doesn't lead to a crash.
    
    
  4. foundin changed to: "obsolete: 8.6b1.1"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "twylite"
  10. subsystem changed to: "60. NRE and coroutines"
  11. title changed to: "trace execution + yield fails ASSERT"
  12. type changed to: "Bug"