Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Y2038 problems on 32-bit systems with 64-bit time_t #482

Open
ijackson opened this issue Jan 17, 2025 · 1 comment · Fixed by #487
Open

Y2038 problems on 32-bit systems with 64-bit time_t #482

ijackson opened this issue Jan 17, 2025 · 1 comment · Fixed by #487

Comments

@ijackson
Copy link
Contributor

In Debian trixie (13, as yet unreleased), several 32-bit architectures have been provided with a 64-bit time_t so that they will continue to work after Y2038. I was not involved with this transition, but it seem to have involved inventing __time64 etc. to be used by new programs.

I have been trying to fix faketime in Debian trixie. While writing a test case I discovered that on these architectures, libfaketime.c is comiled in a way that reverts back to the 32-bit time representation. There are some patches floating about to fake the 64-bit calls (which I'll probably incorporate) but they are wrong, because they (must) all eventually call functions like the internal clock_gettime and fake_clock_gettime, and those are all working with 32-bit struct timespec.

I don't think I understand the area well enough to fix this, but I thought I would at least file a ticket. I think the solution will have to involve compiling clock_gettime and fake_clock_gettime (and maybe others) with 64-bit time_t, struct timespec, etc., so that they can be called by interceptors like clock_gettime64 and time64.

See https://wiki.debian.org/ArchitectureSpecificsMemo for a table of affected architectures.

Thanks for your attention.

@ijackson
Copy link
Contributor Author

Hi. Please reopen this ticket. As I wrote in #487, that MR does not fix this issue!

(I think github has interpreted "this MR does not fix #482" as "please close #482 when this merges, which is totally mad.)

@wolfcw wolfcw reopened this Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants