Skip to content
Tcl Source Code History Of Ticket d1554fca55e91bac
Login

History Of Ticket d1554fca55e91bac

Artifacts Associated With Ticket d1554fca55e91bac

  1. Ticket change [4fec757363] (rid 217051) by kevin_walzer on 2023-08-07 15:32:33:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-plain"
    4. comment initialized to:
                    ]	kevin_walzer 	% package require http
      		2.10b1
      		% package require tls
      		1.7.23
      		% http::register https 443 [list ::tls::socket -autoservername true -require true ]
      		443 {::tls::socket -autoservername true -require true}
      		% set tok [http::geturl https://www.tcl.tk/]
      		Segmentation fault: 11
      		Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
      		0   ???                           	               0x0 ???
      		1   Tcl                           	       0x104d01be4 Tcl_UnregisterChannel + 348
      
      The crash happens with the tcltls extension, but touches Tcl's core channel code, so I am opening this ticket under Tcl.
      
    5. foundin initialized to: "Tip of Tcl 9"
    6. is_private initialized to: "0"
    7. login: "kevin_walzer"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "fd9290ae5f1a8509202a94b7afe132a13188e0cd"
    10. resolution initialized to: "None"
    11. severity initialized to: "Critical"
    12. status initialized to: "Open"
    13. submitter initialized to: "kevin_walzer"
    14. subsystem initialized to: "25. Channel System"
    15. title initialized to: "Crash with ::tls::socket"
    16. type initialized to: "Bug"
  2. Ticket change [15f939f4b6] (rid 217052) by kevin_walzer on 2023-08-07 15:34:57:

    1. comment changed to:
                    	kevin_walzer 	% package require http
      		2.10b1
      		% package require tls
      		1.7.23
      		% http::register https 443 [list ::tls::socket -autoservername true -require true ]
      		443 {::tls::socket -autoservername true -require true}
      		% set tok [http::geturl https://www.tcl.tk/]
      		Segmentation fault: 11
      		Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
      		0   ???                           	               0x0 ???
      		1   Tcl                           	       0x104d01be4 Tcl_UnregisterChannel + 348
      
      The crash happens with the tcltls extension, but touches Tcl's core channel code, so I am opening this ticket under Tcl.
      
    2. login: "kevin_walzer"
    3. mimetype: "text/plain"
  3. Ticket change [07005aa384] (rid 217053) by kevin_walzer on 2023-08-07 15:35:32:

    1. comment changed to:
                    	% package require http
      		2.10b1
      		% package require tls
      		1.7.23
      		% http::register https 443 [list ::tls::socket -autoservername true -require true ]
      		443 {::tls::socket -autoservername true -require true}
      		% set tok [http::geturl https://www.tcl.tk/]
      		Segmentation fault: 11
      		Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
      		0   ???                           	               0x0 ???
      		1   Tcl                           	       0x104d01be4 Tcl_UnregisterChannel + 348
      
      The crash happens with the tcltls extension, but touches Tcl's core channel code, so I am opening this ticket under Tcl.
      
    2. login: "kevin_walzer"
    3. mimetype: "text/plain"
  4. Ticket change [6dd4fa3178] (rid 217148) by kevin_walzer on 2023-08-11 01:56:25:

    1. icomment:
      So after running tclsh with symbols switched on, I have traced the crash to this call:
      		
      		  if ((flags & (TCL_READABLE | TCL_WRITABLE)) == 0) {
      		    	return TclClose(interp, chan);
      		    }
      		
      in tclIO.c, line 3636.
      		
      It's an invalid instruction fetch. Not sure what to do with this info or where to debug further.
      
    2. login: "kevin_walzer"
    3. mimetype: "text/x-markdown"
  5. Ticket change [6e16edb16d] (rid 217149) by chrstphrchvz on 2023-08-11 07:01:56:

    1. icomment:
      [https://core.tcl-lang.org/tips/doc/trunk/tip/562.md|TIP 562] means that the channel function <tt>closeProc()</tt> is deprecated, and <tt>close2Proc()</tt> is mandatory in Tcl 9. But TclTLS only implements a <tt>closeProc()</tt>, and not a <tt>close2Proc()</tt> (nor am I aware of any efforts to implement one). So <tt>TclClose()</tt> assumes <tt>close2Proc()</tt> is available, and crashes since the function pointer for it is <tt>NULL</tt> (which it was set to by <tt>memset()</tt> in <tt>Tls_ChannelType()</tt>).
      
    2. login: "chrstphrchvz"
    3. mimetype: "text/x-fossil-wiki"
  6. Ticket change [6309030dea] (rid 217150) by kevin_walzer on 2023-08-11 11:16:37:

    1. icomment:
      Thank you for this insight - I will review the code base of tcltls in more detail to see if we can implement this. TIP 562 has a basic implementation example.
      
    2. login: "kevin_walzer"
    3. mimetype: "text/plain"
  7. Ticket change [a319e1e6f0] (rid 217156) by kevin_walzer on 2023-08-11 20:46:44:

    1. icomment:
      This pointed me in the right direction. I was able to implement a close2Proc for Tcltls and the package now runs as expected in Tcl 9 without crashing. Thank you for your assistance.
      
    2. login: "kevin_walzer"
    3. mimetype: "text/plain"
  8. Ticket change [922e53e466] (rid 217157) by kevin_walzer on 2023-08-11 20:47:16:

    1. assignee changed to: "kevin_walzer"
    2. closedate changed to: "2460168.36616667"
    3. closer changed to: "kevin_walzer"
    4. login: "kevin_walzer"
    5. mimetype: "text/plain"
    6. priority changed to: "9 Immediate"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"