Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | socket -async and gets/puts stall on windows (Ticket [336441ed59]) win_sock_async_connect_race_fix | andreask | 2014-03-08 | 1 | -0/+10 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a change for a problem which is pretty much impossible to test for in the testsuite, as it is a race condition on a problem with Windows and as such cannot be reliably induced from the Tcl side, script nor C. The problem affects only sockets which are opened -async. At the time of the socket's creation the core will remember this fact in the SocketState flags (SOCKET_ASYNC_CONNECT <SAC>) and in the events to look for with select (FD_CONNECT). Then, to handle the possiblity that the script writes to or read from the socket before the connection has completed the driver functions Tcp(Input|Output)Proc check for the flag, and if it is still set enter WaitForSocketEvent (FD_CONNECT) <WFSE> to sync-wait for the connection before continuing to actually read/write. Unfortunately Windows sometimes deigns to not deliver FD_CONNECT, skipping directly to FD_READ|WRITE. When that happens the unmodified WFSE gets stuck in WFSO, and hangs the entire Tcl process. The core actually already has code to deal with that situation, in part. This code is found in the SOCKET_MESSAGE branch of the big switch in SocketProc(). When it finds <SAC> in the flags not reset by an FD_CONNECT event it unconditionally clears the flag and forces an FD_WRITE on other parts (My change adds a comment to the location in question, as marker). This code works for when Windows delivers the first event before the script manages to read/write from the new socket, because then the driver functions will see the cleared flag and not enter WFSE to wait for FD_CONNECT in the first place. However, if the script was fast enough to already be in the WFSE waiting for FD_CONNECT then the main thread is stuck and the change made by SocketProc() does not help. The commit here fixes that issue by extending WFSE to recognize the reset of SAC by SocketProc() as a valid break condition when it waits for FD_CONNECT, thus preventing it from getting stuck. | ||||
* | New tests covering INPUT_NEED_NL flag handling. One exposes a bug. | dgp | 2014-02-26 | 1 | -0/+71 |
| | |||||
* | Do not reopen a win serial channel for serial detection. There are issues ↵ | oehhar | 2014-02-24 | 3 | -13/+165 |
|\ | | | | | | | with some Bluetooth virtual com. Fix bug [2413550], patch by Rolf Schroedter | ||||
| * | Changed position of flag evaluation as proposed by Phil Hoffmanbug_2413550 | oehhar | 2014-02-11 | 1 | -18/+18 |
| | | |||||
| * | merge 8.5 | oehhar | 2014-01-30 | 2 | -187/+116 |
| |\ | |||||
| * | | win/tclWinChan.c Tcl_InitNotifier: Bug [2413550] Avoid reopening of serial ↵ | oehhar | 2014-01-30 | 4 | -13/+171 |
| | | | | | | | | | | | | channels which causes issues with Bluetooth virtual com. Patch by Rolf Schroedter. | ||||
* | | | [1230597] Update test comment. | dgp | 2014-02-19 | 1 | -1/+1 |
| | | | |||||
* | | | typo | jan.nijtmans | 2014-02-12 | 2 | -2/+2 |
| | | | |||||
* | | | Change the flag value to avoid merge conflict with trunk. | dgp | 2014-02-06 | 1 | -1/+1 |
| | | | |||||
* | | | [a4494e28ed] Use flag bit instead of NULL pointer to suppress teardown list of | dgp | 2014-02-06 | 3 | -10/+39 |
| | | | | | | | | | | | | | | | imported commands when the original command gets re-created. This prevents the panic otherwise possible when the invalid state represented by the NULL pointer is encountered during a command delete trace. | ||||
* | | | Check for existance of __BORLANDC__ before using its value | jan.nijtmans | 2014-02-06 | 1 | -1/+1 |
| | | | |||||
* | | | Satisfy required position of __stdcall from VC++ | jan.nijtmans | 2014-02-04 | 2 | -4/+4 |
| | | | |||||
* | | | remove duplicate declaration | jan.nijtmans | 2014-02-04 | 1 | -1/+0 |
| | | | |||||
* | | | Add missing __stdcall (which crashes on win32), and clean-up indenting | jan.nijtmans | 2014-02-04 | 2 | -20/+23 |
| | | | |||||
* | | | Simplify the core output operations of channels. Reduce duplicative and | dgp | 2014-02-04 | 3 | -586/+68 |
|\ \ \ | | | | | | | | | dead code. | ||||
| * | | | Be sure to finalize the identity encoding.dgp_optimize_output_stage | dgp | 2014-02-04 | 1 | -0/+1 |
| | | | | |||||
| * | | | merge 8.5 | dgp | 2014-02-03 | 4 | -15/+42 |
| |\ \ \ | |/ / / |/| | | | |||||
* | | | | Fix [651e828a52]: Wrong Windows version reported for Windows 8.1 | jan.nijtmans | 2014-02-03 | 2 | -11/+36 |
| | | | | |||||
* | | | | Fix [4b3b7a3082]: tcl8.5.15/generic/tclExecute.c:7713: array index before ↵ | jan.nijtmans | 2014-01-31 | 1 | -3/+5 |
| |_|/ |/| | | | | | | | | sanity check ? | ||||
* | | | Fix [22c10c8e79]: core-8-5: msvc6 build: "Side by Side" error | jan.nijtmans | 2014-01-30 | 1 | -1/+1 |
| | | | |||||
* | | | Eliminate the use of a staging buffer in WriteChars(). | dgp | 2014-01-30 | 1 | -186/+115 |
|\ \ \ | |_|/ |/| | | |||||
| | * | Simplify macro typecasting. | dgp | 2014-01-31 | 1 | -6/+3 |
| | | | |||||
| | * | The "channel" Tcl_ObjType is caching only. It never needs an UpdateString ↵ | dgp | 2014-01-31 | 1 | -46/+6 |
| | | | | | | | | | | | | | | | routine. It's also static to the tclIO.c file. | ||||
| | * | Do not call updateStringProc directly. We have TclGetString() for that. | dgp | 2014-01-31 | 1 | -10/+1 |
| | | | |||||
| | * | Refactor to eliminate the DoWriteChars() layer. | dgp | 2014-01-30 | 1 | -64/+22 |
| | | | |||||
| | * | Eliminate DoWrite(). It duplicates WriteBytes(). | dgp | 2014-01-30 | 1 | -163/+2 |
| | | | |||||
| | * | Trial: Implement DoWrite() as WriteBytes(). | dgp | 2014-01-30 | 1 | -0/+4 |
| | | | |||||
| | * | Simplification and cleanup enabled by last commit. | dgp | 2014-01-30 | 1 | -301/+7 |
| | | | |||||
| | * | Refactor WriteChars() and WriteBytes() into simple wrappers of a common | dgp | 2014-01-30 | 3 | -13/+39 |
| |/ | | | | | routine Write(). | ||||
| * | The outputStage field is now unused, so never allocate it. | dgp | 2014-01-28 | 1 | -29/+0 |
| | | |||||
| * | tidy things up | dgp | 2014-01-28 | 1 | -194/+17 |
| | | |||||
| * | Working code with no staging buffer use. | dgp | 2014-01-28 | 1 | -31/+97 |
| | | |||||
| * | WIP | dgp | 2014-01-28 | 1 | -0/+69 |
| | | |||||
| * | merge 8.5 | dgp | 2014-01-27 | 2 | -0/+4 |
| |\ | |/ |/| | |||||
* | | sync tcl.m4 with Tk version | jan.nijtmans | 2014-01-25 | 2 | -0/+4 |
| | | |||||
* | | In WriteChars(), eliminate the copy step through a staging buffer when | dgp | 2014-01-24 | 1 | -10/+12 |
|\ \ | |/ | | | it is not required for channel translation. | ||||
| * | Eliminate the copy to a staging buffer when that serves no functional purpose. | dgp | 2014-01-24 | 1 | -10/+12 |
|/ | |||||
* | Silence compiler warnings. | dgp | 2014-01-21 | 1 | -6/+6 |
| | |||||
* | [a122627849] Improve stack trace from parray on not-array. | dkf | 2013-11-24 | 1 | -1/+1 |
| | |||||
* | Cygwin: Fix conflicting definition with _mingw_stat64.h, if included ↵ | jan.nijtmans | 2013-11-22 | 1 | -1/+1 |
| | | | | together with <tcl.h> | ||||
* | Modify makefile.vc for Windows 8.1 support | jan.nijtmans | 2013-11-21 | 1 | -1/+9 |
| | |||||
* | Add support for Windows 8.1: See ↵ | jan.nijtmans | 2013-11-21 | 4 | -3/+78 |
| | | | | [http://msdn.microsoft.com/en-us/library/windows/desktop/dn302074.aspx] | ||||
* | The only relyable way of changing environment variables to uppercase (e.g. ↵ | jan.nijtmans | 2013-11-21 | 2 | -44/+39 |
| | | | | env(ComSpec) to env(COMSPEC)) is unsetting the old one first. Long-standing bug, exposed by [219226]. | ||||
* | Safer clean-up of environment variables: Do removal after insertions -> ↵ | jan.nijtmans | 2013-11-20 | 4 | -10/+13 |
| | | | | tcltest 2.3.7 | ||||
* | Starting with Windows 8 DSK, GetVersionExA is deprecated | jan.nijtmans | 2013-11-20 | 2 | -6/+6 |
| | |||||
* | Cygwin: Instead of checking whether the win32 part is configured properly, ↵ | jan.nijtmans | 2013-11-19 | 3 | -8/+23 |
| | | | | | just configure it when needed. Always build the stub library first (and - on Cygwin - configure win32 properly just before building the stub library) | ||||
* | Fix [e832d2b08]: unnecessary code in Tcl_SetMaxBlockTime. | jan.nijtmans | 2013-11-16 | 1 | -5/+1 |
| | |||||
* | Fix [426679ef7d]: Having man.macros after .TH breaks rendering on OpenBSD ↵ | jan.nijtmans | 2013-11-05 | 209 | -209/+209 |
| | | | | and possibly others. | ||||
* | Put extern "C" guards around all stub table struct definitions, so it is ↵ | jan.nijtmans | 2013-11-04 | 6 | -17/+28 |
| | | | | | usable for C++ compilers as well without the danger of modifying the calling convention. For tclDecls.h it was no problem, because tcl.h already contains those guards. But for the other *Decls.h files (e.g. tclTomMathDecls.h) it was not correct. | ||||
* | Workaround for [414d10346b]: tcl 8.5.15/8.6.1(threaded build) hangs in exec ↵ | jan.nijtmans | 2013-10-29 | 2 | -6/+5 |
| | | | | on HP-UX |