Overview
| Artifact ID: | abea6006fa55fc89be4f9e72a40bda275178b3bb3b55a4b354d8b4edb2ccebee |
|---|---|
| Ticket: | 1b8df101101c94cefa2caf9857e87b73cb5a3011
Tcl_GetTime returns wrong usec value on Windows |
| User & Date: | apnadkarni on 2023-03-04 08:15:24 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-markdown"
- comment changed to:
When called from a stubs-enabled extension, Tcl_GetTime returns the wrong value for the usecs field on Windows. This is illustrated by the winTime-2.1 test failure in all Tcl versions 8.6 onward. The test failure was ignored all this while because of the comment in the test case that the test fails because of Windows OS discrepancies. Debugging reveals that it is in fact a Tcl bug cause by [these lines](https://core.tcl-lang.org/tcl/file?ci=tip&name=generic/tclDecls.h&ln=3967-3983) The usec value gets overwritten on line 3979 with the low 32 bits of the secs value (union with the reserved field). Based on the comment there, the purpose of that macro wrapper is to allow loading a non-Cygwin Tk into a Cygwin tclsh. I don't quite understand the issue there but in any case, it is the cause of the above bug. I don't know what the fix is because I don't know what the underlying issue is that is being fixed. As an aside, in my opinion supporting mixed Cygwin-native Win32 configurations is fraught with peril and should not be a supported configuration.
- foundin changed to: "8.6"
- is_private changed to: "0"
- login: "apnadkarni"
- priority changed to: "5 Medium"
- private_contact changed to: "9546e9877f1a8899e25a89082561ee694e7fb402"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "apnadkarni"
- subsystem changed to: "03. Timer Events"
- title changed to: "Tcl_GetTime returns wrong usec value on Windows"
- type changed to: "Bug"