Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 01f7bd1b90232f9c4b47798c9561620fb7ae0335
Ticket: 82521bfb6734f891ddecc26b4b4b3388fdc3eb1c
Segfault from commit af06c0fbf8 onwards
User & Date: anonymous on 2014-09-26 16:19:08
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    I haven't been able to reduce this to a minimal test case, but it is reliably reproducible on our systems.  Prior to commit [af06c0fbf8] the code works, after that it segfaults (most of the time) or throws an error of the form "can't set "set�Rl": upvar refers to variable in deleted namespace".  The reported variable name differs and appears to be the result of random memory corruption.  Sometimes the error message refers to a deleted array rather than namespace.  The error always seems to be thrown at the same line, which doesn't set any variables:
    
    if {[string compare $dateopened ""] != 0 || $openrequest} {
    
    The code runs in NaviServer (4.99.6) and is part of a 200k line codebase, and since it appears to be failing as a result of prior state corruption it is proving difficult to reduce to a minimal test case.  The core dumps don't paint a very consistent picture, but often it appears to be in TEBCresume, under the doStoreVarDirect label, the line Tcl_DecrRefCount(valuePtr).  valuePtr is often 0x600000002, which is invalid.
    
    I bisected the commit history between 8.6.2 (bad) and 8.6.1 (good).  Commit [eabc1b8699] doesn't produce the segfault or errors, [af06c0fbf8] does.
    
    Running on Ubuntu 12.04 64 bit, Tcl and NaviServer both 64 bit.
    
  5. foundin changed to: "8.6.2"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "54152f94cb1628c0c148b4b5708ace53216227b0"
  10. resolution changed to: "None"
  11. severity changed to: "Critical"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "47. Bytecode Compiler"
  15. title changed to: "Segfault from commit af06c0fbf8 onwards"
  16. type changed to: "Bug"