.
D 2000-10-26T01:04:23
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s1806\sBug\nVersion:\s8.1b3\nSubmitDate:\s'1999-04-14'\nLastModified:\s'2000-01-12'\nSeverity:\sSER\nStatus:\sReleased\nSubmitter:\spat\nChangedBy:\shobbs\nOS:\sOther\nOSVersion:\sReliantUNIX-N\s5.44C10\nMachine:\sNA\nFixedDate:\s'2000-01-12'\nFixedInVersion:\s8.3b2\nClosedDate:\s'2000-10-25'\n\n\nName:\nAndrej\sBorsenkow\n\nCustomShell:\nI\sadded\sblock\sto\sconfigure.in\sto\srecognise\sReliantUNIX\sfor\sdynamic\sloading.\sThe\sCFLAGS\swere\sset\sto\senable\s64\sbit\scompile\smode.\n\nReproducibleScript:\nI've\sdone\sa\stest\sdrive\sfor\scompiling\sTcl\s8.1b3\son\sReliantUNIX\s(formerly\n\s\s\s\sSINIX)\sin\s64\sbit\smode\son\sMIPS\sR4400.\sThe\sclock\stests\spartially\sfailed.\n\s\s\s\sAt\sleast\sin\ssome\scases\sthe\sreason\swas\swrong\shandling\sof\stime_t\n\s\s\s\svariables.\n\n\s\s\s\sOn\sour\ssystem\sin\s64\sbit\smode\ssizeof(long)\s==\s8,\sbut\ssizeof(time_t)\s==\s4\n\s\s\s\s(signed\s32\sbit\svalue).\sThe\sproblem\sis,\sthat\sFormatClock()\sgets\sunsigned\n\s\s\s\slong\sclockVal,\sthan\spasses\sit\sby\s*reference*\sto\sTclpGetDate(),\sthat\n\s\s\s\sconverts\spointers\sto\sclockVal\sto\spointer\sto\stime_t.\sBut\sin\sthis\scase,\n\s\s\s\sonly\sthe\sfirst\s4\sbytes\sof\sclockVal\sare\sused;\sas\sReliantUNIX\sis\srunning\n\s\s\s\sin\sMSB\smode,\sthey\sare\salmost\salways\szero.\n\n\s\s\s\sThere\sis\sone\smore\shidden\sbug\shere\s-\sthe\svalue\sof\sunsigned\slong\scan\n\s\s\s\soverflow\stime_t.\sIt\sis\shard\sto\stell\swhat\sto\sdo\s-\sprobably,\sTcl\sshould\n\s\s\s\scheck\sfor\sthe\slargest\spossible\svalue\sof\stime_t\sand\sreturn\swith\san\serror\n\s\s\s\sif\spassed\sclockVal\sis\stoo\slarge.\n\nObservedBehavior:\nclock\scommand\sfails\sin\smost\scases.\sMost\sof\sclock\stests\sfail.\sTime/date\n\s\s\s\smanipulation\sis\snearly\simpossible\n\n\n\n4/15/99\s-\sredman\s-\sOK,\swhy\sis\stime_t\san\sint\son\sReliantUNIX?\s\sThis\sshould\sprobably\sbe\sfixed\sanyway.\n--\nFrom\sClevenger\s(for\stclClock.c):\n\s\s\s\s/*\n\s\s\s\s\s*\sPointer\smust\spoint\sto\sa\svariable\sof\stype\stime_t\sfor\sproper\sendian\s\n\s\s\s\s\s*\sbehavior.\sCannot\sjust\scaste\saddress\sof\sclockVal.\n\s\s\s\s\s*/\n\s\s\s\stclockVal\s=\s(time_t)\sclockVal;\n\s\s\s\stimeDataPtr\s=\sTclpGetDate((time_t\s*)\s&tclockVal,\suseGMT);\n\nThe\snoted\sproblem,\salong\swith\sone\ssimilar\soccurrence\sin\stclGetDate.y\nwas\sfixed\sfor\s8.3b2.\n\nAs\sfor\sthe\spotential\soverflow\sproblem,\sone\ssolution\swould\sbe\sto\scheck\nif\ssizeof(long)\s>\ssizeof(time_t),\sand\suse\sTcl_GetIntFromObj\sif\sso.\nHowever,\sTcl\sis\sonly\sdefined\sto\swork\swithout\sstandard\sPOSIX\sparameters,\nwhich\smakes\sthe\soverflow\sstuff\sundefined\sanyway.\s\n--\s01/12/2000\shobbs\n\n
J foundin obsolete:\s8.1b3
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 48.\sNumber\sHandling
J title Bug\sin\stime_t\shandling\son\s64\sbit\sReliant\sUNIX
J type Bug
K 218705ffffffffffffffffffffffffffffffffff
U nobody
Z c271b049e2e43da715a41d431bc31e35