segmentation fault in t_splay() calling Tcl_Alloc()

From: Anthony Davis (adavis_at_addpower.com)
Date: 10/06/03


Date: 6 Oct 2003 11:19:25 -0700

Let me first start this message by stating that I believe this to be
an error in gcc, but I wanted to see if anyone else may have seen this
and could offer their advice:
On my system (SCO UNIX 5.0.6 ) Tcl_Alloc maps to malloc and I am
getting a segmentation fault in the libc function t_splay() after
calling Tcl_Alloc() in my application.
GDB output to follow:

(gdb) run
Starting program: /var/opt/K/SCO/Unix/5.0.6Ga/usr/local/src/pcl0.0.1/bin/pclsh
% source test.pcl
Opening file: om1reg.soa
records read: 0
records read: 1

Program received signal SIGSEGV, Segmentation fault.
0x80023aac in t_splay () from /usr/lib/libc.so.1
(gdb) where
#0 0x80023aac in t_splay () from /usr/lib/libc.so.1
#1 0x8002397f in t_delete () from /usr/lib/libc.so.1
#2 0x800231d7 in _real_malloc () from /usr/lib/libc.so.1
#3 0x80023019 in malloc () from /usr/lib/libc.so.1
#4 0x80b952d in TclpAlloc ()
#5 0x8059ac8 in Tcl_Alloc ()
#6 0x809f448 in Tcl_NewStringObj ()
#7 0x80504f6 in Pcl_ReadObjCmd (clientData=0x81200a8,
interp=0x8109114,objc=2, objv=0x810b694) at generic/Pcl_Main.c:340
#8 0x8055efa in TclEvalObjvInternal ()
#9 0x807489a in TclExecuteByteCode ()
#10 0x8073dc0 in TclCompEvalObj ()
#11 0x8056c5e in Tcl_EvalObjEx ()
#12 0x805a6e5 in Tcl_CatchObjCmd ()
#13 0x8055efa in TclEvalObjvInternal ()
#14 0x807489a in TclExecuteByteCode ()
#15 0x8073dc0 in TclCompEvalObj ()
#16 0x8056c5e in Tcl_EvalObjEx ()
#17 0x805c18e in Tcl_ForObjCmd ()
#18 0x8055efa in TclEvalObjvInternal ()
#19 0x805677a in Tcl_EvalEx ()
#20 0x8089d08 in Tcl_FSEvalFile ()
#21 0x806197a in Tcl_SourceObjCmd ()
#22 0x8055efa in TclEvalObjvInternal ()
#23 0x807489a in TclExecuteByteCode ()
#24 0x8073dc0 in TclCompEvalObj ()
#25 0x8056c5e in Tcl_EvalObjEx ()
#26 0x80baa6e in Tcl_RecordAndEvalObj ()
#27 0x808f60b in Tcl_Main ()
#28 0x804b113 in main (argc=1, argv=0x8047cf0) at
generic/pclAppInit.c:99
#29 0x804b00b in _start ()

Any help is greatly appreciated.
Anthony



Relevant Pages

  • Segmentation Fault help requested
    ... I am working on a script that opens a telnet session to a router, ... GNU gdb 19991004 ... Reading symbols from /lib/libdl.so.2...done. ... #11 0x4004a6b4 in TclExecuteByteCode from ...
    (comp.lang.tcl)
  • tcl 8.4.1 aborts on AIX 5.1 when compiled in 64-bit mode, any solutions ?
    ... I am compiling the Tcl 8.4.1 64 bit on ... Segmentation fault in TclExecuteByteCode at 0x900000000f1ec98 ... TclCompEvalObj() at 0x900000000f23c60 ... TclObjInterpProc() at 0x900000000f066e4 ...
    (comp.unix.aix)
  • Re: wishx (tclX) segmentation fault
    ... This GDB was configured as "i386-redhat-linux"... ... #10 0x81182d4 in TclCompEvalObj ... then compiled wishx using tclX8.3.5. ... The compile went ...
    (comp.lang.tcl)
  • Re: wishx (tclX) segmentation fault
    ... This GDB was configured as "i386-redhat-linux"... ... #10 0x81182d4 in TclCompEvalObj ... then compiled wishx using tclX8.3.5. ... The compile went ...
    (comp.lang.tcl)
  • Re: malloc segfault-followup-HELP!!
    ... I added the gdb backtrace to the end of this ... #14 0x0821703b in TclExecuteByteCode ...
    (comp.lang.c)