Skip to content
Tcl Source Code History Of Ticket 6b3a427c25bcf0c1
Login

History Of Ticket 6b3a427c25bcf0c1

Artifacts Associated With Ticket 6b3a427c25bcf0c1

  1. Ticket change [61acf99b0a] (rid 155337) by gcramer on 2017-08-11 16:19:07:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/html"
    4. comment initialized to:
      That's what I'm doing:
      
      <verbatim>
          set chan [open $filename.tmp w]
          fconfigure $chan -encoding utf-8
      </verbatim>
      
      <p>
      The result is a segmentation fault [unix/tclEpollNotfy.c:254]. If I test with valgrind then I get the following messages:
      
      <verbatim>
      ==3837== Syscall param epoll_ctl(event) points to uninitialised byte(s)
      ==3837==    at 0x4829EEE: epoll_ctl (syscall-template.S:81)
      ==3837==    by 0x449C3AF: PlatformEventsControl (tclEpollNotfy.c:258)
      ==3837==    by 0x449C931: Tcl_CreateFileHandler (tclEpollNotfy.c:547)
      ==3837==    by 0x4498B97: TcpWatchProc (tclUnixSock.c:1079)
      ==3837==    by 0x4498F21: TcpConnect (tclUnixSock.c:1304)
      ==3837==    by 0x4498BE6: TcpAsyncCallback (tclUnixSock.c:1136)
      ==3837==    by 0x449BF20: FileHandlerEventProc (tclUnixNotfy.c:275)
      ==3837==    by 0x444B2EF: Tcl_ServiceEvent (tclNotify.c:670)
      ==3837==    by 0x444B5CA: Tcl_DoOneEvent (tclNotify.c:903)
      ==3837==    by 0x4062876: Tk_MainLoop (in /usr/local/lib/libtk8.7.so)
      ==3837==    by 0x4072049: Tk_MainEx (in /usr/local/lib/libtk8.7.so)
      ==3837==    by 0x80538CE: main (tkscidb.cpp:110)
      ==3837==  Address 0xbed54b24 is on thread 1's stack
      ==3837== 
      ==3837== Use of uninitialised value of size 4
      ==3837==    at 0x449C386: PlatformEventsControl (tclEpollNotfy.c:254)
      ==3837==    by 0x449C9C6: Tcl_DeleteFileHandler (tclEpollNotfy.c:602)
      ==3837==    by 0x448FE24: FileWatchProc (tclUnixChan.c:485)
      ==3837==    by 0x441FFF2: ChanWatch (tclIO.c:512)
      ==3837==    by 0x44289E7: UpdateInterest (tclIO.c:8490)
      ==3837==    by 0x4427F8F: Tcl_SetChannelOption (tclIO.c:8026)
      ==3837==    by 0x442D379: Tcl_FconfigureObjCmd (tclIOCmd.c:820)
      ==3837==    by 0x43435EB: Dispatch (tclBasic.c:4376)
      ==3837==    by 0x434366B: TclNRRunCallbacks (tclBasic.c:4409)
      ==3837==    by 0x4342F80: Tcl_EvalObjv (tclBasic.c:4139)
      ==3837==    by 0x43451A6: TclEvalEx (tclBasic.c:5278)
      ==3837==    by 0x434476C: Tcl_EvalEx (tclBasic.c:4943)
      ==3837== 
      ==3837== Invalid write of size 4
      ==3837==    at 0x449C386: PlatformEventsControl (tclEpollNotfy.c:254)
      ==3837==    by 0x449C9C6: Tcl_DeleteFileHandler (tclEpollNotfy.c:602)
      ==3837==    by 0x448FE24: FileWatchProc (tclUnixChan.c:485)
      ==3837==    by 0x441FFF2: ChanWatch (tclIO.c:512)
      ==3837==    by 0x44289E7: UpdateInterest (tclIO.c:8490)
      ==3837==    by 0x4427F8F: Tcl_SetChannelOption (tclIO.c:8026)
      ==3837==    by 0x442D379: Tcl_FconfigureObjCmd (tclIOCmd.c:820)
      ==3837==    by 0x43435EB: Dispatch (tclBasic.c:4376)
      ==3837==    by 0x434366B: TclNRRunCallbacks (tclBasic.c:4409)
      ==3837==    by 0x4342F80: Tcl_EvalObjv (tclBasic.c:4139)
      ==3837==    by 0x43451A6: TclEvalEx (tclBasic.c:5278)
      ==3837==    by 0x434476C: Tcl_EvalEx (tclBasic.c:4943)
      ==3837==  Address 0x6d6a706b is not stack'd, malloc'd or (recently) free'd
      </verbatim>
      
    5. foundin initialized to: "8.7"
    6. is_private initialized to: "0"
    7. login: "gcramer"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "9b7155594aadef44d10a978838b8fe108cdafdd1"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "gcramer"
    14. subsystem initialized to: "24. Channel Commands"
    15. title initialized to: "Crash with fconfigure"
    16. type initialized to: "Bug"
  2. Ticket change [daea47a26e] (rid 257799) by serhiy.storchaka on 2026-10-12 19:45:06:

    1. icomment:
      I cannot reproduce it, even with 8.7a1 (epoll notifier): opening and
      reconfiguring regular files and sockets with and without file events, including
      asynchronous connects that retry another address, runs clean under valgrind
      with 8.7a1, 8.7a5, 8.7b1 and 9.1. Can you provide a script that reproduces it?
      
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Works For Me"
    5. status changed to: "Pending"