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

Verify Y2k38 issue, 64-bit time #676

Open
marceltaeumel opened this issue Feb 13, 2024 · 1 comment
Open

Verify Y2k38 issue, 64-bit time #676

marceltaeumel opened this issue Feb 13, 2024 · 1 comment

Comments

@marceltaeumel
Copy link
Contributor

https://lwn.net/ml/debian-devel-announce/[email protected]/

We might want to think about a strategy für 32-bit VM flavors and how OSVM (and Squeak, Cuis, ... for that matter) would be affected by this issue. Let's discuss this here.

@eliotmiranda
Copy link
Contributor

eliotmiranda commented Feb 14, 2024

Luckily our exposure is very small:

$ find src platforms -type f -exec grep -lw time_t {} \;
platforms/minheadless/unix/sqUnixHeartbeat.c
platforms/minheadless/unix/sqPlatformSpecific-Unix.c
platforms/minheadless/windows/sqWin32Backtrace.c
platforms/minheadless/windows/sqPlatformSpecific-Win32.c
platforms/Plan9/plugins/FilePlugin/sqPlan9file.c
platforms/Plan9/vm/sqPlan9io.c
platforms/Plan9/vm/sqPlatformSpecific.h
platforms/Mac OS/plugins/LocalePlugin/sqMacLocaleOS9.c
platforms/Mac OS/plugins/LocalePlugin/sqMacLocaleCarbon.c
platforms/Mac OS/vm/Developer/sqMacMinimal.c
platforms/Mac OS/vm/sqMacMain.c
platforms/Mac OS/vm/sqMacTime.c
platforms/Mac OS/vm/sqMacNSPluginUILogic.c
platforms/Mac OS/vm/sqMacTime.h
platforms/Cross/plugins/OggPlugin/sqOgg.c
platforms/Cross/vm/sqVirtualMachine.c
platforms/iOS/plugins/LocalePlugin/sqIOSLocale.c
platforms/iOS/plugins/FilePlugin/sqUnixFile.c
platforms/iOS/vm/Common/Classes/sqMacV2Time.c
platforms/iOS/vm/Common/Classes/sqSqueakMainApp.m
platforms/iOS/vm/Common/Classes/sqSqueakMainApplication.m
platforms/unix/misc/threadValidate/sqUnixHeartbeat.c
platforms/unix/plugins/LocalePlugin/sqUnixLocale.c
platforms/unix/plugins/FileAttributesPlugin/faSupport.c
platforms/unix/plugins/FileAttributesPlugin/faSupport.h
platforms/unix/plugins/FilePlugin/sqUnixFile.c
platforms/unix/vm-display-X11/sqUnixXdnd.c
platforms/unix/vm/sqUnixITimerTickerHeartbeat.c
platforms/unix/vm/sqUnixHeartbeat.c
platforms/unix/vm/sqUnixMain.c
platforms/unix/vm/sqUnixITimerHeartbeat.c
platforms/win32/vm/sqWin32Main.c
platforms/win32/vm/sqWin32Backtrace.c

And these uses are pretty localized:

$ grep time_t platforms/unix/vm/*
platforms/unix/vm/sqUnixHeartbeat.c:	time_t utctt;
platforms/unix/vm/sqUnixHeartbeat.c:  extern time_t timezone, altzone;
platforms/unix/vm/sqUnixITimerHeartbeat.c:	time_t utctt;
platforms/unix/vm/sqUnixITimerHeartbeat.c:  extern time_t timezone, altzone;
platforms/unix/vm/sqUnixITimerTickerHeartbeat.c:	time_t utctt;
platforms/unix/vm/sqUnixITimerTickerHeartbeat.c:  extern time_t timezone, altzone;
platforms/unix/vm/sqUnixMain.c:time_t convertToSqueakTime(time_t unixTime);
platforms/unix/vm/sqUnixMain.c:sqLong convertToLongSqueakTime(time_t unixTime);
platforms/unix/vm/sqUnixMain.c: * WARNING: On 32 bit platforms time_t is only 32 bits long.
platforms/unix/vm/sqUnixMain.c:time_t
platforms/unix/vm/sqUnixMain.c:convertToSqueakTime(time_t unixTime)
platforms/unix/vm/sqUnixMain.c:convertToLongSqueakTime(time_t unixTime)
platforms/unix/vm/sqUnixMain.c:	time_t now = time(NULL);
platforms/unix/vm/sqUnixMain.c:	time_t now = time(NULL);
platforms/unix/vm/sqUnixMain.c:  if (sizeof(time_t) != 4) error("This C compiler's time_t's are not 32 bits.");

I would expect we can deal with this in a few hours. I need to check what their proposed changes are, and then we can package the differences in abstractions, and deal with 32-bit and 64-bit time_t on 32-bit platforms pretty straight-forwardly. Thanks for the heads up!

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

No branches or pull requests

2 participants