https://lwn.net/ml/debian-devel-announce/Zb0WpSukajgythGe@homer.dodds.net/
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.
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!
This is a good description of the plan:
https://sourceware.org/glibc/wiki/Y2038ProofnessDesign#Design
Possibly we just need to define _TIME_BITS=64 ? And test that of course on a 32 bit system that does have 64 bit time.
Vanessa
On Tue, Feb 13, 2024 at 5:46 PM Eliot Miranda via Vm-dev < vm-dev@lists.squeakfoundation.org> wrote:
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!
— Reply to this email directly, view it on GitHub https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/676#issuecomment-1942962149, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIJPEW3G2L3ISGSL7SCNJBTYTQJNZAVCNFSM6AAAAABDGE4IZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBSHE3DEMJUHE . You are receiving this because you are subscribed to this thread.Message ID: OpenSmalltalk/opensmalltalk-vm/issues/676/1942962149@github.com
vm-dev@lists.squeakfoundation.org