Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2016-04-08
13:33 • Closed ticket [2538f373ff]: crash in Tcl_OpenTcpServer() on Windows plus 5 o... artifact: 4f7937eaad user: jan.nijtmans
13:32 • Ticket [2538f373ff]: 4 changes artifact: 732e1b832a user: jan.nijtmans
13:30
Fix [2538f373ffc78d6dba9c3d973c147a84fdd9bbd8|2538f373ffc78d6d]: crash in Tcl_OpenTcpServer() on Win... check-in: 697c1c9931 user: jan.nijtmans tags: trunk
13:27
Fix [2538f373ffc78d6dba9c3d973c147a84fdd9bbd8|2538f373ffc78d6d]: crash in Tcl_OpenTcpServer() on Win... check-in: e40eb76900 user: jan.nijtmans tags: core-8-6-branch
2016-04-07
21:43 • Ticket [2538f373ff] crash in Tcl_OpenTcpServer() on Windows status still Ope... artifact: a11e260519 user: oehhar
2016-04-06
23:36 • New ticket [2538f373ff]. artifact: 23f645487c user: griffin

crash in Tcl_OpenTcpServer() on Windows

Closed / Fixed2538f373ffc78d6dba9c3d973c147a84fdd9bbd8Created 11 years agoUpdated 11 years ago
Descriptionplain2016-04-06 23:36:35
Windows only:
If Tcl_OpenTcpServer() is the very first Socket call, then the thread data is not set correctly resulting in a crash.  Found in an embedded application.  Not reproducible via tclsh.

tclWinSock.c:
  2064      ThreadSpecificData *tsdPtr = TclThreadDataKeyGet(&dataKey);
  2065  
  2066      if (TclpHasSockets(interp) != TCL_OK) {
  2067  	return NULL;
  2068      }

The order above, KeyGet followed by HasSocket, is backwards.

that's a week of my life I'll never get back :)
Referenced by2
oehharwiki2016-04-07 21:43:55

Thank you Brian. I will look into that next week when I am back in the office.

- Harald

jan.nijtmansplain2016-04-08 13:32:57
Fixed in core-8-6-branch and trunk (didn't find this in core-8-5-branch). Thanks! Good catch!
jan.nijtmans Closed ticket [2538f373ff]. [History diff]2016-04-08 13:33:42
Log in (anonymous is fine) to add a comment.