Skip to content
Tcl Source Code History Of Ticket 1879097fffffffff
Login

History Of Ticket 1879097fffffffff

Artifacts Associated With Ticket 1879097fffffffff

  1. Ticket change [17b86a46ad] (rid 122542) by teopetuk on 2008-01-24 19:23:15:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The following program segfaults (Tcl 8.5.0 on Debian GNU/Linux, also checked on 8.5b3, doesn't work either):
      
      % cat test.c
      
      #include <stdio.h>
      
      #include <tcl.h>
      
      void
      refcount_test (const char *fname, Tcl_Obj *o)
      {
       printf ("%s () => %p\n", fname, o);
       fputs ("trying Tcl_IncrRefCount (), Tcl_DecrRefCount ()... ", stdout);
       fflush (stdout);
       Tcl_IncrRefCount (o);
       Tcl_DecrRefCount (o);
       fputs ("done\n", stdout);
      }
      
      int
      main ()
      {
       refcount_test ("Tcl_NewObj",
                      Tcl_NewObj ());
       refcount_test ("Tcl_NewIntObj",
                      Tcl_NewIntObj (123));
       refcount_test ("Tcl_NewStringObj",
                      Tcl_NewStringObj ("test", -1));
       refcount_test ("Tcl_NewDictObj",
                      Tcl_NewDictObj ());
      
       /* . */
       return 0;
      }
      
      % make CFLAGS=-g\ -Wall\ -I/usr/include/tcl8.5 test LDFLAGS=-ltcl8.5
      
      The output is:
      % ./test
      Tcl_NewObj () => 0x804a2f8
      trying Tcl_IncrRefCount (), Tcl_DecrRefCount ()... done
      Tcl_NewIntObj () => 0x804a2f8
      trying Tcl_IncrRefCount (), Tcl_DecrRefCount ()... done
      Tcl_NewStringObj () => 0x804a2f8
      trying Tcl_IncrRefCount (), Tcl_DecrRefCount ()... done
      Tcl_NewDictObj () => 0x804a2f8
      trying Tcl_IncrRefCount (), Tcl_DecrRefCount ()... zsh: segmentation fault (core dumped)  ./test
      
      The backtrace is:
      % gdb -c core test
      ......
      (gdb) bt
      #0  0x00000000 in ?? ()
      #1  0xf7f52249 in ThreadStorageGetHashTable (id=0xf7d008e0)
          at /home/sergei/debian/tcl-pkg/build-area/tcl8.5-8.5.0/unix/../generic/tclThreadStorage.c:212
      #2  0xf7f5239a in TclpThreadDataKeyGet (keyPtr=0xf7f9473c)
          at /home/sergei/debian/tcl-pkg/build-area/tcl8.5-8.5.0/unix/../generic/tclThreadStorage.c:336
      #3  0xf7f50756 in Tcl_GetThreadData (keyPtr=0xf7f9473c, size=8)
          at /home/sergei/debian/tcl-pkg/build-area/tcl8.5-8.5.0/unix/../generic/tclThread.c:87
      #4  0xf7f3157a in TclFreeObj (objPtr=0x804a2f8)
          at /home/sergei/debian/tcl-pkg/build-area/tcl8.5-8.5.0/unix/../generic/tclObj.c:911
      #5  0x08048694 in refcount_test (fname=0x80488d1 "Tcl_NewDictObj", o=0x804a2f8) at test.c:12
      #6  0x08048736 in main () at test.c:25
      
      The original bug report in Debian BTS is available at http://bugs.debian.org/462409
      
    4. foundin initialized to: "obsolete: 8.5.0"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "teopetuk"
    10. subsystem initialized to: "15. Dict Object"
    11. title initialized to:
      Segfault on increasing and descreasing refcounter for Dict
      
    12. type initialized to: "Bug"
  2. Ticket change [fe5e54864d] (rid 108576) by mistachkin on 2008-01-25 03:32:56:

    1. icomment:
      Logged In: YES 
      user_id=113501
      Originator: NO
      
      
      This appears to be caused by the thread storage subsystem not having been initialized.  A call to Tcl_FindExecutable function in main() prior to calling any other Tcl C API functions should fix the problem.
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  3. Ticket change [597307fddf] (rid 117980) by dkf on 2008-01-29 21:21:41:

    1. closedate changed to: "2008-01-29T14:21:41"
    2. closer changed to: "dkf"
    3. resolution changed to: "Invalid"
    4. status changed to: "Pending"
  4. Ticket change [636d0dc93b] (rid 92573) by sf-robot on 2008-02-14 00:44:01:

    1. closedate changed to: "2008-02-13T17:44:01"
    2. closer changed to: "sf-robot"
    3. icomment:
      Logged In: YES 
      user_id=1312539
      Originator: NO
      
      This Tracker item was closed automatically by the system. It was
      previously set to a Pending status, and the original submitter
      did not respond within 14 days (the time period specified by
      the administrator of this Tracker).
      
      
    4. login: "sf-robot"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "sf-robot"