<i>tk make test fails with "unknown floating-point error" errno</i>.
by
.
D 2000-10-26T00:57:00
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s4942\sBug\nVersion:\s8.3\nSubmitDate:\s'2000-04-07'\nLastModified:\s'2000-04-10'\nSeverity:\sSER\nStatus:\sClosed\nSubmitter:\stechsupp\nChangedBy:\shobbs\nRelatedBugIDs:\s4980\nOS:\sLinux\nOSVersion:\sLinux\s2.2.14,\sglibc\s2.1.3\nFixedDate:\s'2000-10-25'\nClosedDate:\s'2000-04-10'\n\n\nName:\n\nPeter\sRunestig\n\n\nComments:\n\nThe\sinclution\sof\s"#include\s<huge_val.h>"\sin\stclPort.h\smight\snot\sbe\sthe\n\n\s\s\s\sbest\sway\sto\sdo\sit,\sbut\sI\sleave\sit\sto\syou\stcl\swizards\sto\sdecide\swhere\sto\n\n\s\s\s\sput\sit.\n\n\n\s\s\s\sThis\sis\sa\sstrange\sbug\swhich\smust\sorigin\sfrom\sglibc\sor\ssomething,\ssince\n\n\s\s\s\ssystems\saffected\s(like\smine)\sis\smore\sor\sless\sdisabled\sfrom\susing\stcl/tk;\n\n\s\s\s\smost\sapplications\sfail\sin\sone\sway\sor\sanother.\sIf\smore\ssystems\swhere\n\n\s\s\s\saffected,\sthere\swould\sbe\smore\snoise\sabout\sit,\sand\sit\swould\sbe\sfixed\sby\n\n\s\s\s\snow.\n\n\nReproducibleScript:\n\nBuild\stcl,\smake\stest,\sbuild\stk,\smake\stest.\n\n\nObservedBehavior:\n\n[luna@r2\sunix]$\smake\stest\n\nLD_LIBRARY_PATH=`pwd`:/home/luna/tcl8.3.0/unix:;\s\\\n\nexport\sLD_LIBRARY_PATH;\s\\\n\nLIBPATH=`pwd`:/home/luna/tcl8.3.0/unix:;\sexport\sLIBPATH;\s\\\n\nSHLIB_PATH=`pwd`:/home/luna/tcl8.3.0/unix:;\s\\\n\nexport\sSHLIB_PATH;\s\\\n\nTCL_LIBRARY=/home/luna/tcl8.3.0/library;\sexport\sTCL_LIBRARY;\s\\\n\nTK_LIBRARY=/home/luna/tk8.3.0/library;\sexport\sTK_LIBRARY;\s\\\n\n./tktest\s./../tests/all.tcl\s-geometry\s+0+0\s\n\nError\sin\sstartup\sscript:\sunknown\sfloating-point\serror,\serrno\s=\s84\n\n\s\s\s\swhile\sexecuting\n\n"format\s%g\s5e-5"\n\n\s\s\s\s(procedure\s"::tcltest::initConfig"\sline\s158)\n\n\s\s\s\sinvoked\sfrom\swithin\n\n"::tcltest::initConfig"\n\n\s\s\s\s(file\s"/home/luna/tk8.3.0/unix/./../tests/defs.tcl"\sline\s354)\n\n\s\s\s\sinvoked\sfrom\swithin\n\n"source\s[file\sjoin\s[pwd]\s[file\sdirname\s[info\sscript]]\sdefs.tcl]"\n\n\s\s\s\sinvoked\sfrom\swithin\n\n"if\s{[lsearch\s[namespace\schildren]\s::tcltest]\s==\s-1}\s{\n\n\s\s\s\ssource\s[file\sjoin\s[pwd]\s[file\sdirname\s[info\sscript]]\sdefs.tcl]\n\n}"\n\n\s\s\s\s(file\s"./../tests/all.tcl"\sline\s12)\n\nmake:\s***\s[test]\sError\s1\n\n[luna@r2\sunix]$\n\n\nDesiredBehavior:\n\nThis\sis\sa\sfollow-up\son\sTR#4118.\sThe\sproblem,\serrno\s!=\s0\swhen\sstrtod()\sdidn't\sfail,\saffect\smore\sfiles.\sAnd\stesting\sfor\sd\s==\s0\sdon't\scut\sit\s(d\scould\scorrectly\sbe\sset\sto\s0\sfrom\sstrtod()),\stesting\sfor\sstring\s==\send\sis\sbetter.\n\n\nPatch:\n\ndiff\s-ur\stcl8.3.0.orig/generic/tclGet.c\stcl8.3.0/generic/tclGet.c\n\n---\stcl8.3.0.orig/generic/tclGet.c\s\s\s\s\s\sSat\sDec\s\s4\s07:15:41\s1999\n\n+++\stcl8.3.0/generic/tclGet.c\s\s\sFri\sApr\s\s7\s21:44:10\s2000\n\n@@\s-222,7\s+222,7\s@@\n\n\s\s\s\s\s\s\s\s\s}\n\n\s\s\s\s\s\s\s\sreturn\sTCL_ERROR;\n\n\s\s\s\s\s}\n\n-\s\s\s\sif\s(errno\s!=\s0)\s{\n\n+\s\s\s\sif\s(errno\s!=\s0\s&&\s(d\s==\sHUGE_VAL\s||\sd\s==\s-HUGE_VAL\s||\sstring\s==\send))\s{\n\n\s\s\s\s\s\s\s\s\sif\s(interp\s!=\s(Tcl_Interp\s*)\sNULL)\s{\n\n\s\s\s\s\s\s\s\s\s\s\s\s\sTclExprFloatError(interp,\sd);\s\n\n\s\s\s\s\s\s\s\s\s}\n\ndiff\s-ur\stcl8.3.0.orig/generic/tclObj.c\stcl8.3.0/generic/tclObj.c\n\n---\stcl8.3.0.orig/generic/tclObj.c\s\s\s\s\s\sSat\sDec\s\s4\s07:15:41\s1999\n\n+++\stcl8.3.0/generic/tclObj.c\s\s\sFri\sApr\s\s7\s21:46:17\s2000\n\n@@\s-1395,7\s+1395,7\s@@\n\n\s\s\s\s\s\s\s\s}\n\n\s\s\s\s\s\s\s\sreturn\sTCL_ERROR;\n\n\s\s\s\s\s}\n\n-\s\s\s\sif\s(errno\s!=\s0)\s{\n\n+\s\s\s\sif\s(errno\s!=\s0\s&&\s(newDouble\s==\sHUGE_VAL\s||\snewDouble\s==\s-HUGE_VAL\s||\sstring\s==\send))\s{\n\n\s\s\s\s\s\s\s\sif\s(interp\s!=\sNULL)\s{\n\n\s\s\s\s\s\s\s\s\s\s\s\sTclExprFloatError(interp,\snewDouble);\n\n\s\s\s\s\s\s\s\s}\n\ndiff\s-ur\stcl8.3.0.orig/generic/tclParseExpr.c\stcl8.3.0/generic/tclParseExpr.c\n\n---\stcl8.3.0.orig/generic/tclParseExpr.c\s\s\s\s\s\s\s\sSat\sDec\s\s4\s07:15:42\s1999\n\n+++\stcl8.3.0/generic/tclParseExpr.c\s\s\s\s\sFri\sApr\s\s7\s21:46:57\s2000\n\n@@\s-1556,7\s+1556,8\s@@\n\n\s\s\s\s\s\s\s\s\s\s\s\serrno\s=\s0;\n\n\s\s\s\s\s\s\s\s\s\s\s\sdoubleValue\s=\sstrtod(src,\s&termPtr);\n\n\s\s\s\s\s\s\s\s\s\s\s\sif\s(termPtr\s!=\ssrc)\s{\n\n-\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sif\s(errno\s!=\s0)\s{\n\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sif\s(errno\s!=\s0\s&&\s(doubleValue\s==\sHUGE_VAL\s||\sdoubleValue\s==\s-HUGE_VAL\n\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s||\ssrc\s==\stermPtr))\s{\n\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sif\s(interp\s!=\sNULL)\s{\n\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sTclExprFloatError(interp,\sdoubleValue);\n\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s}\n\ndiff\s-ur\stcl8.3.0.orig/generic/tclPort.h\stcl8.3.0/generic/tclPort.h\n\n---\stcl8.3.0.orig/generic/tclPort.h\s\s\s\s\sTue\sMay\s25\s03:00:27\s1999\n\n+++\stcl8.3.0/generic/tclPort.h\s\sFri\sApr\s\s7\s20:55:12\s2000\n\n@@\s-28,4\s+28,6\s@@\n\n\s#\s\s\s\sendif\n\n\s#endif\n\n\n+#include\s<huge_val.h>\n\n+\n\n\s#endif\s/*\s_TCLPORT\s*/\n\n\nPatchFiles:\n\ngeneric/tclGet.c\n\n\s\s\s\sgeneric/tclGet.c\n\n\s\s\s\sgeneric/tclParseExpr.c\n\n\s\s\s\sgeneric/tclPort.h\n\n\n\n\nFrom\soriginal\sposter:\n\nI\s(who\sposted\sthis\sbug\sreport)\smust\smake\sa\ssignificant\scorrection:\sThe\nglibc\sversion\saffected\sis\s*2.0.7pre6*,\snot\s2.1.3.\sRunning\sthe\stest\nprogram\sposted\sby\sUlrich\sRing\sshows:\n\n-------------\serr84.c\s---------------------\n#include\s<stdlib.h>\n#include\s<errno.h>\n\nint\smain\s(int\sargc,\schar\s**argv)\n{\n\s\s\s\s\s\s\s\schar\sbytes[2]\s=\s{\s0xc0\s};\n\s\s\s\s\s\s\s\swchar_t\swc;\n\s\s\s\s\s\s\s\sdouble\sd;\n\n\s\s\s\s\s\s\s\s/*\sMay\shappen\sinside\sX11\s(XOpenIM)\s*/\n\s\s\s\s\s\s\s\smbtowc\s(&wc,\sbytes,\s1);\n\s\s\s\s\s\s\s\s\n\s\s\s\s\s\s\s\s/*\sHappens\sinside\sTcl\swhich\schecks\sfor\serrno\s==\s0\s*/\n\s\s\s\s\s\s\s\serrno\s=\s0;\n\s\s\s\s\s\s\s\sd\s=\sstrtod("1.0",\s0);\n\s\s\s\s\s\s\s\sprintf("ERRNO=%d\\n",\serrno);\n}\n--------------------------------------------\n\nglibc\s2.0.7pre6:\sERRNO=84\n\nglibc\s2.1.3:\sERRNO=0\n\nSorry\sfor\sthe\serror\sin\sthe\sbug\sreport.\n\nCheers,\nPeter\s\n--\s04/10/2000\shobbs
J foundin obsolete:\s8.3
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 75.\sTutorial
J title tk\smake\stest\sfails\swith\s"unknown\sfloating-point\serror"\serrno
J type Bug
K 218390ffffffffffffffffffffffffffffffffff
U nobody
Z b05c40fb48c0b46f66851254d4471a7f