Tcl Source Code

Ticket Change Details
Login
Overview

Artifact ID: 532ca439bb9842506b18ead8c12d6c3a152bbfb5969ec04c13b06359398acf44
Ticket: fc1409fc9193f33f39f7e6ea353364a9a4b8048c
TclOO method with non-literal value for body argument causes segmentation fault
User & Date: pooryorick 2017-10-19 21:26:13
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    The following script causes a segmentation fault:
    
    <code><verbatim>
    ::oo::objdefine oo::object {
    	method m1 {} [string map {a b} hello] 
    }
    
    oo::copy oo::object obj1
    obj1 m1 
    </verbatim></code>
    
    This is a regression cause by the fix to bug 3609693. In
    TclOOMethod.c/CloneProcedureMethod, <code>TclFreeIntRep(bodyObj)</code> occurs
    on a Tcl_Obj that has no string representation.  The solutions is to call
    <code>Tcl_GetString(bodyObj)</code> first.
    
  5. is_private changed to: "0"
  6. login: "pooryorick"
  7. priority changed to: "5 Medium"
  8. private_contact changed to: "e476148cded301ffff84bcdc432536dc0c949e88"
  9. resolution changed to: "None"
  10. severity changed to: "Important"
  11. status changed to: "Open"
  12. submitter changed to: "pooryorick"
  13. subsystem changed to: "35. TclOO Package"
  14. title changed to:
    TclOO method with non-literal value for  body argument causes segmentation fault
    
  15. type changed to: "Bug"