Overview
| Artifact ID: | 17b86a46add4c2b3e72b292bd9eb36ff79f81e1c |
|---|---|
| Ticket: | 1879097fffffffffffffffffffffffffffffffff
Segfault on increasing and descreasing refcounter for Dict |
| User & Date: | teopetuk on 2008-01-24 19:23:15 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed 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 changed to: "obsolete: 8.5.0"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "teopetuk"
- subsystem changed to: "15. Dict Object"
- title changed to:
Segfault on increasing and descreasing refcounter for Dict
- type changed to: "Bug"