| Ticket UUID: | 2538f373ffc78d6dba9c3d973c147a84fdd9bbd8 | |||
| Title: | crash in Tcl_OpenTcpServer() on Windows | |||
| Type: | Bug | Version: | 8.6.5 | |
| Submitter: | griffin | Created on: | 2016-04-06 23:36:35 | |
| Subsystem: | 37. File System | Assigned To: | jan.nijtmans | |
| Priority: | 5 Medium | Severity: | Severe | |
| Status: | Closed | Last Modified: | 2016-04-08 13:33:42 | |
| Resolution: | Fixed | Closed By: | jan.nijtmans | |
| Closed on: | 2016-04-08 13:33:42 | |||
| Description: |
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 :)
| |||
| User Comments: |
jan.nijtmans added on 2016-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! oehhar added on 2016-04-07 21:43:55: Thank you Brian. I will look into that next week when I am back in the office. - Harald | |||