Posted to tcl by cgm at Wed May 27 06:46:47 GMT 2026view raw
- Core was generated by `tclsh9.0 news_code.tcl -port 8015 -sport 8016'.
- Program terminated with signal SIGSEGV, Segmentation fault.
- #0 0x00007f7907108de5 in Tcl_OutputBuffered () from /usr/local/lib/libtcl9.0.so
- (gdb) where
- #0 0x00007f7907108de5 in Tcl_OutputBuffered () from /usr/local/lib/libtcl9.0.so
- #1 0x00007f79072bab7b in TlsChannelHandlerTimer (clientData=0x555a3ba32590) at ./generic/tlsIO.c:1047
- #2 0x00007f7907155e65 in TimerHandlerEventProc () from /usr/local/lib/libtcl9.0.so
- #3 0x00007f790712e935 in Tcl_ServiceEvent () from /usr/local/lib/libtcl9.0.so
- #4 0x00007f790712eb56 in Tcl_DoOneEvent () from /usr/local/lib/libtcl9.0.so
- #5 0x00007f79070e6f84 in Tcl_VwaitObjCmd () from /usr/local/lib/libtcl9.0.so
- #6 0x00007f7907049252 in TclNRRunCallbacks () from /usr/local/lib/libtcl9.0.so
- #7 0x00007f7907155bbc in AfterProc () from /usr/local/lib/libtcl9.0.so
- #8 0x00007f79071564d6 in TclServiceIdle () from /usr/local/lib/libtcl9.0.so
- #9 0x00007f790712eb2d in Tcl_DoOneEvent () from /usr/local/lib/libtcl9.0.so
- #10 0x00007f79070e6f84 in Tcl_VwaitObjCmd () from /usr/local/lib/libtcl9.0.so
- #11 0x00007f7907049252 in TclNRRunCallbacks () from /usr/local/lib/libtcl9.0.so
- #12 0x00007f790704b11b in TclEvalEx () from /usr/local/lib/libtcl9.0.so
- #13 0x00007f790711da8b in Tcl_FSEvalFileEx () from /usr/local/lib/libtcl9.0.so
- #14 0x00007f7907129048 in Tcl_MainEx () from /usr/local/lib/libtcl9.0.so
- #15 0x0000555a024330dd in main ()
- (gdb)
Comments
Posted by cgm at Wed May 27 07:54:05 GMT 2026 [text] [code]
More GDB: (gdb) up #1 0x00007f79072bab7b in TlsChannelHandlerTimer (clientData=0x555a3ba32590) at ./generic/tlsIO.c:1047 1047 if (Tcl_OutputBuffered(statePtr->self) || BIO_wpending(statePtr->bio)) { (gdb) p statePtr->self $3 = (Tcl_Channel) 0x555a3a605240 (gdb) x/4 0x555a3a605240 0x555a3a605240: 0x0 0x2 0x555a3a605250: 0x2 0x1 So 0x555a3a605240 should contain a Channel struct. The first element of that should be `struct ChannelState *state` but that is null, so when Tcl_OutputBuffered tries to dereference it we get a crash.