Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4dad7af251cdca8bda42a4b94ed5932a4afe62c0
Ticket: 551061651d07944a19c76706530f51ea67b9abae
Crash evaluating [uplevel 1 {info vars _u_defer_var}] from inside a itcl class proc
User & Date: bigfaceworm on 2017-04-14 18:56:12
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    This has been reproduced with ActiveState releases 8.6.5 and 8.6.6
    
    The following script causes a segmentation fault (core dump).
    
    Unsure of the category (don't know if it's OO or uplevel), please assign the category appropriately.
    
    # ---------------begin script-------------------
    package require Itcl
    
    proc ::try_uplevel {} {
      return [uplevel 1 [list ::info vars _u_defer_var]]
    }
    
    itcl::class ::test_class {
      constructor {} {}
    
      public proc test_via_proc {} {
        ::try_uplevel
      }
    }
    
    ::test_class::test_via_proc
    # ---------------end script-------------------
    
    The problem is that the Tcl core code is getting a null pointer and dereferencing it in tclVar.c, AppendLocals(....)
    
      if (iPtr->varFramePtr->isProcCallFrame & FRAME_IS_METHOD) {
    	CallContext *contextPtr = iPtr->varFramePtr->clientData;
    	Method *mPtr = contextPtr->callPtr->chain[contextPtr->index].mPtr;
    
    the contextPtr is null.
    
  5. foundin changed to: "8.6.6"
  6. is_private changed to: "0"
  7. login: "bigfaceworm"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "5cf9569cda9cff4e20f184ff96974aff0f932dfb"
  10. resolution changed to: "None"
  11. severity changed to: "Severe"
  12. status changed to: "Open"
  13. submitter changed to: "bigfaceworm"
  14. subsystem changed to: "None"
  15. title changed to:
    Crash evaluating [uplevel 1 {info vars _u_defer_var}] from inside a itcl class proc
    
  16. type changed to: "Bug"