Artifacts Associated With Ticket 1879097fffffffff
Ticket change [17b86a46ad] (rid 122542) by teopetuk on 2008-01-24 19:23:15:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- 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 - foundin initialized to: "obsolete: 8.5.0"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "teopetuk"
- subsystem initialized to: "15. Dict Object"
- title initialized to:
Segfault on increasing and descreasing refcounter for Dict
- type initialized to: "Bug"
Ticket change [fe5e54864d] (rid 108576) by mistachkin on 2008-01-25 03:32:56:
- 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.
- login: "mistachkin"
- mimetype: "text/plain"
- username: "mistachkin"
- icomment:
Ticket change [597307fddf] (rid 117980) by dkf on 2008-01-29 21:21:41:
- closedate changed to: "2008-01-29T14:21:41"
- closer changed to: "dkf"
- resolution changed to: "Invalid"
- status changed to: "Pending"
Ticket change [636d0dc93b] (rid 92573) by sf-robot on 2008-02-14 00:44:01:
- closedate changed to: "2008-02-13T17:44:01"
- closer changed to: "sf-robot"
- 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).
- login: "sf-robot"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "sf-robot"