Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 32735f3e23d914a345204e8b3bdac67d260440b0
Ticket: 1988779fffffffffffffffffffffffffffffffff
Tcl_SetStringObj called with shared object
User & Date: cnassau on 2008-06-09 10:30:30
Changes

  1. assignee changed to: "vasiljevic"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    We're occasionally seeing panics with Thread.2.6.5 and Tcl.8.5.2:
    
       Tcl_SetStringObj called with shared object
    
    A typical stack trace is
    
    IOT/Abort trap in pthread_kill at 0xd005aaf4 ($t8)
    0xd005aaf4 (pthread_kill+0xa8) 80410014        lwz   r2,0x14(r1)
    (dbx) where
    pthread_kill(??, ??) at 0xd005aaf4
    _p_raise(??) at 0xd005a100
    raise.raise(??) at 0xd01e367c
    abort.abort() at 0xd01f2280
    Tcl_PanicVA() at 0xd4f14c78
    Tcl_Panic() at 0xd4f14cf4
    Tcl_SetStringObj() at 0xd4f3293c
    ThreadSend() at 0xd5ded484
    ThreadSendObjCmd() at 0xd5dea548
    TclEvalObjvInternal() at 0xd4f4b1c8
    (...)
    
    The implementation of ThreadSend in file thread2.6.5/generic/threadCmd.c contains the lines
    
        code = resultPtr->code;
        Tcl_SetStringObj(Tcl_GetObjResult(interp), resultPtr->result, -1);
    
    which seems suspicious. I see no compelling reason why Tcl_GetObjResult(interp) should be unshared at that point, so a plain
    
        Tcl_SetResult(interp, resultPtr->result, TCL_VOLATILE);
    
    should be used instead.
    
    Note: there's also a similar line in SvObjObjCmd in file 
    thread2.6.5/generic/threadSvCmd.c
    
     
    
  4. foundin changed to: "obsolete: 8.5.2"
  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: "cnassau"
  10. subsystem changed to: "80. Thread Package"
  11. title changed to: "Tcl_SetStringObj called with shared object"
  12. type changed to: "Bug"