|
2023-07-21
| ||
| 07:22 | • Closed ticket [02b58d5d04]: Direct access of *64 functions by Tcl code (code cle... artifact: c7a1b0a6f2 user: jan.nijtmans | |
|
2023-07-20
| ||
| 20:16 | • Ticket [02b58d5d04]: 3 changes artifact: 3dffb03515 user: chrstphrchvz | |
| 13:35 | • Ticket [d40b9c8503] Enforcing 64-bit time_t? status still Closed with 4 othe... artifact: 759646e4fc user: jan.nijtmans | |
| 13:34 | • Ticket [d40b9c8503]: 5 changes artifact: ceb18e804c user: jan.nijtmans | |
| 13:06 | • Ticket [d40b9c8503]: 5 changes artifact: f41b0b56b7 user: chrstphrchvz | |
| 12:49 | • Closed ticket [d40b9c8503]. artifact: 872a1b4e5f user: jan.nijtmans | |
| 12:45 | Fix [d40b9c8503]: Enforcing 64-bit time_t? check-in: 3196eb3638 user: jan.nijtmans tags: trunk, main | |
| 11:47 | • Ticket [d40b9c8503] Enforcing 64-bit time_t? status still Open with 3 other ... artifact: 2ed01555c7 user: chrstphrchvz | |
| 10:39 | • Ticket [d40b9c8503]: 3 changes artifact: 42b9276eff user: jan.nijtmans | |
| 10:38 | • Ticket [d40b9c8503]: 3 changes artifact: 98b883d4aa user: jan.nijtmans | |
| 10:38 | • Add attachment config.log to ticket [d40b9c8503] artifact: 48a6d3e37e user: jan.nijtmans | |
| 10:06 | • Ticket [d40b9c8503] Enforcing 64-bit time_t? status still Open with 3 other ... artifact: 18c15f9c31 user: chrstphrchvz | |
| 08:33 | • Ticket [d40b9c8503]: 3 changes artifact: 9d374682fc user: jan.nijtmans | |
|
2023-07-12
| ||
| 20:13 | • Closed ticket [c1691dc608]: 32-bit Linux regressions plus 7 other changes artifact: 0dac5e3e95 user: jan.nijtmans | |
| 17:47 | • Ticket [c1691dc608]: 3 changes artifact: e522acb261 user: chrstphrchvz | |
|
2023-04-27
| ||
| 04:40 | • Ticket [a1aaca786b] Configure & build 32-bit Linux not working status st... artifact: 9f9669b5cf user: chrstphrchvz | |
| 04:37 | • Ticket [d40b9c8503] Enforcing 64-bit time_t? status still Open with 3 other ... artifact: a13771a8f3 user: chrstphrchvz | |
|
2023-04-26
| ||
| 17:05 | • Ticket [a1aaca786b] Configure & build 32-bit Linux not working status st... artifact: 79de662cc3 user: chrstphrchvz | |
|
2023-03-26
| ||
| 15:56 | • Ticket [d40b9c8503] Enforcing 64-bit time_t? status still Open with 4 other ... artifact: 5bb9319abb user: jan.nijtmans | |
| 15:51 | Patch from chrstphrchvz, fixing [d40b9c8503]. Many thanks! check-in: 58faf80de7 user: jan.nijtmans tags: bug-d40b9c8503 | |
| 05:38 | • Ticket [d40b9c8503] Enforcing 64-bit time_t? status still Open with 3 other ... artifact: 09fae44c06 user: chrstphrchvz | |
| 05:34 | • Ticket [d40b9c8503]: 3 changes artifact: ba2b2fa71d user: chrstphrchvz | |
|
2023-03-24
| ||
| 13:31 | • Ticket [d40b9c8503]: 4 changes artifact: 89e2caa777 user: chrstphrchvz | |
|
2023-03-08
| ||
| 10:00 | • Ticket [d40b9c8503]: 3 changes artifact: 06fab267d9 user: jan.nijtmans | |
| 09:38 | • New ticket [d40b9c8503]. artifact: 12308a95d4 user: chrstphrchvz | |
Enforcing 64-bit time_t?
Currently, when I build Tcl 9.0 on ia32 (32-bit x86) Linux, it uses 32-bit time_t, but the tests cmdAH-24.20.1 and cmdAH-24.20.2 fail (rather than skip as with 8.7; timestamp 3155760000 overflows to -1139207296). I can also reproduce the issue in [fa128568a597]. (Maybe the same would happen for 32-bit ARM.)
I read elsewhere that glibc 2.34 and Linux kernel 5.6 support 64-bit time_t on 32-bit systems by compiling with _FILE_OFFSET_BITS=64 and _TIME_BITS=64 defined, and that future glibc may even define these by default. I tried building Tcl 9.0 again with these defined, and confirmed that doing so avoids the overflow issues. This approach reportedly supersedes/conflicts with the approach of defining _LARGEFILE64_SOURCE, as proposed removed in the bug-02b58d5d04 branch. Would it be appropriate for Tcl/Tk to instead define _FILE_OFFSET_BITS=64 and _TIME_BITS=64 by default (possibly before package managers all begin separately trying to do so themselves)?
3196eb3638Fix [d40b9c8503]: Enforcing 64-bit time_t? check-in2023-07-20 12:45:010dac5e3e95Closed ticket [c1691dc608]: 32-bit Linux regressions plus 7 other changes ticket2023-07-12 20:13:49e522acb261Ticket [c1691dc608] 32-bit Linux regressions status still Open with 3 other changes ticket2023-07-12 17:47:099f9669b5cfTicket [a1aaca786b] Configure & build 32-bit Linux not working status still Open with 3 other changes ticket2023-04-27 04:40:1879de662cc3Ticket [a1aaca786b] Configure & build 32-bit Linux not working status still Open with 3 other changes ticket2023-04-26 17:05:5458faf80de7Patch from chrstphrchvz, fixing [d40b9c8503]. Many thanks! check-in2023-03-26 15:51:21
> To what extent does/should Tcl 9.0 assume/require/enforce 64-bit time_t?
I think that Tcl 9.0 - indeed - should enforce 64-bit time_t. That used to be a problem in Windows (since older msvcrt libraries don't have 64-bit time functions), but that's solved now. So, if you want to provide a patch for your platform (best place would be in tcl.m4), yes please!
I believe I misunderstood the purpose of the bug-02b58d5d04 branch, and that the proposal in this ticket would actually complement the work in it: _FILE_OFFSET_BITS=64 affects the functions exposed by _LARGEFILE_SOURCE, as an alternative to using functions exposed by _LARGEFILE64_SOURCE which that branch removes usage of. Can that branch please be updated from the current main branch?
I think that Tcl 9.0 - indeed - should enforce 64-bit time_t. … So, if you want to provide a patch for your platform (best place would be in tcl.m4), yes please!
Thanks for the suggestion, I have zero experience with M4 but have cargo culted roughly how this could be done anyway:
- Hack SC_TCL_EARLY_FLAG() to accept a 4th optional argument for the value to define a C macro to (1 by default)
- Define _FILE_OFFSET_BITS=64 during SC_TCL_EARLY_FLAGS if that is needed to get 64-bit off_t
- Define _TIME_BITS=64 during SC_TCL_64BIT_FLAGS if that is needed to get 64-bit time_t
- Error out if 64-bit time_t is unavailable.
See https://github.com/tcltk/tcl/compare/main...chrstphrchvz:tcl:timet64 (currently based on main branch, but would eventually prefer to base it on bug-02b58d5d04).
Also, I may also be underestimating how controversial it would be for Tcl 9.0 to require 64-bit time_t, as this would drop support (if they haven’t been dropped already) for certain less popular systems such as FreeBSD i386.
Thanks for the patch. I committed it to its own [branch] in order to do some testing.
In the meantime I also did some thinking what way I would like to go. Your implementation exactly looks like that! Many thanks, I like it!
I don't think it's really necessary to officially drop support for systems with a 32-bit time_t. A few failing testcases (showing that time functions won't work as expected after 2038 any more) should be enough.
Trying this branch on 32-bit Ubuntu:
.... checking for 64-bit time_t... no checking if _TIME_BITS=64 enables 64-bit time_t... no configure: error: no 64-bit time_t available
So, it's not right yet
Jan, can I please take a look at config.log if possible? Which Ubuntu version is used?
Ubuntu-16.04.1
config.log now attached to this ticket
Thanks. Unfortunately, the glibc and kernel version in Ubuntu 16.04 will not support this approach, so what you see is expected. Ubuntu 21.10 (the first release with glibc 2.34) is likely the earliest that will work.
In that case, we shouldn't _enforce_ time64_t, just encourage it, doing everything possible to enable it. If that's not possible, everything works except 2 test-case failures: that should be enough warning not to trust the system any more when the year approaches 2038. OK?
Many thanks!
In that case, I would suggest leaving a message in cmdAH-24.20.1/cmdAH-24.20.2 about the expected failures, so as to avoid further duplicate bug reports or someone adding back the time64bit constraint.
[cc0fee411c13b2b5]. Thanks!
If a system has a 64-bit time_t, but those 2 testcases fail, we still want a bug-report!
Attachments:
- config.log [download] added by jan.nijtmans on 2023-07-20 10:38:02. [details]