http://bugs.winehq.org/show_bug.cgi?id=58230
Bug ID: 58230 Summary: File creation time ATL CTime year<1970 assertion error on M4 mac. Local timezone? Product: Wine Version: 10.7 Hardware: arm OS: MacOS Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: fiendishx@gmail.com
Versions of MFC ATL since the v141 Visual Studio build toolchain changed a year boundary assertion in CTime::CTime(int, int, int, int, int, int, int) from 1900 (in v140) to 1970 (v141, v142, v143), so it now has
ATLENSURE( nYear >= 1970 );
where it previously had
ATLENSURE( nYear >= 1900 );
I have a secondhand report from someone that on an M4 Mac, during CFile::GetFilePath -> CFile::GetStatus, the CTime constructor is getting an invalid creation time in 1969. Specifically, 6 hours before 1970, which is suspiciously equal to their time zone of -6.
They temporarily modified the ATL CTime code used to build their program (not ideal, obviously) and made it emit:
nYear from within CTime System time year is less than 1970 Year: 1969 Month: 12 Day: 31 Hour: 18 Minute: 0 Second: 0 DST: -1
This does not produce an error with Visual Studio build toolchain v140 and earlier, but does after v141. Can someone who knows where to look make sure that file creation times aren't being sent too far into the past because of local timezones? (Can we also clamp the year to 1970?)
http://bugs.winehq.org/show_bug.cgi?id=58230
--- Comment #1 from fiendishx@gmail.com --- The person reporting this to me now also says that removing _USE_32BIT_TIME_T Visual Studio compile macro eliminates the crash for them.