<i>Segfault in large pgm with large no. of scalar globals</i>.
by
.
D 2000-10-26T01:05:13
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s2092\sBug\nVersion:\s8.1\nSubmitDate:\s'1999-05-18'\nLastModified:\s'1999-11-08'\nSeverity:\sCRIT\nStatus:\sReleased\nSubmitter:\spat\nChangedBy:\shobbs\nOS:\sLinux\nOSVersion:\s2.2.1\nMachine:\sOther\nFixedDate:\s'1999-11-08'\nFixedInVersion:\s8.2.2\nClosedDate:\s'2000-10-25'\n\n\nName:\nRobert\sWoodside\n\nReproducibleScript:\nIt\scan't\sbe\sdone\swith\sa\sshort\sscript\s-\sit\sappears\sto\srequire\squite\sa\n\s\s\s\slarge\sprogram\scontainng\sa\slarge\snumber\sof\sscalar\sglobal\svars\s-\ssee\n\s\s\s\sdescription\sbelow.\n\nObservedBehavior:\nI\sam\sgetting\sbug\sreports\sthat\smy\spopular\sshareware\soffering,\sTkZip,\n\s\s\s\scauses\sthe\sTcl\sinterpreter\sto\ssegfault\swith\sthe\snew\s8.1\srelease.\s(I\n\s\s\s\shave\n\s\s\s\sreports\sspecifically\son\sSGI\sand\sLinux\ssystems\sso\sfar.)\n\s\s\s\s\n\s\s\s\sThe\sbug\sseems\sto\shave\sto\sdo\swith\sa\svery\slarge\sprogram\scontaining\sa\n\s\s\s\slarge\snumber\sof\sglobal\sscalar\svariables.\n\s\s\s\s\n\s\s\s\sUnfortunately,\sI\shave\sbeen\sunable\sto\scause\sthis\sto\soccur\swith\sa\ssmall,\n\s\s\s\smanageable\ssnippet\sof\scode\s-\sit\sseems\sto\srequire\sa\srather\slarge\sprogram\n\s\s\s\s\n\s\s\s\s\n\s\s\s\sThe\sprogram\sis\srather\stoo\slarge\sto\sinclude\sinline\s(682K);\showever,\sit\n\s\s\s\scan\sbe\sfetched\sfrom\sthe\sTkZip\shome\spage\sat\n\s\s\s\shttp://www.pcnet.com/~proteus/TkZip.\n\s\s\s\sVersion\s1.0.8\s(http://www.pcnet.com/~proteus/TkZip/TkZip-1.0.8.tar.gz)\n\s\s\s\sis\sthe\n\s\s\s\sone\sthat\ssegfaults;\sI\swill\sleave\sit\sthere\sfor\sa\swhile;\sI\shave\sreleased\sa\n\s\s\s\s1.0.9\n\s\s\s\sversion\swhich\shas\sa\sworkaround\sfor\sthe\sproblem.\n\s\s\s\s\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s------------------------------------------------------\n\s\s\s\s\n\s\s\s\sHere\sis\swhat\shappens\swith\sversion\s1.0.8\sunder\sTcl\s8.1.\sThe\ssegfault\n\s\s\s\soccurs\sat\sline\s436\sin\sTkZip,\swhich\sreads:\n\s\s\s\s\n\s\s\s\s>\scatch\s{puts\s$si\s"\\n================\\nXserver\sprobe\sresponse:\\n\n\s\s\s\s$tmp\\n================\\n"}\n\s\s\s\s\n\s\s\s\sThe\serror\shas\snothing\sto\sdo\swith\sthis\sline\sof\scode,\showever,\sA\sstack\n\s\s\s\strace\n\s\s\s\sshows\sthe\sfollowing:\n\s\s\s\s\n\s\s\s\s>\s#0\s\s0x402c4ede\sin\sstrlen\s(str=0x804a030\s"|¡\\004\\b")\n\s\s\s\s>\s(gdb)\sbt\n\s\s\s\s>\s#0\s\s0x402c4ede\sin\sstrlen\s(str=0x804a030\s"|¡\\004\\b")\n\s\s\s\s>\s#1\s\s0x818d900\sin\s??\s()\n\s\s\s\s>\s#2\s\s0x4016bbf8\sin\sTcl_AppendResult\s(arg1=0x804a030)\n\s\s\s\s>\s\s\s\s\sat\s./../generic/tclResult.c:543\n\s\s\s\s>\s#3\s\s0x40177dd1\sin\sVarErrMsg\s(interp=0x804a030,\spart1=0x21\s"7",\n\s\s\s\spart2=0x0,\n\s\s\s\s>\s\s\s\s\soperation=0x40189ff8\s"read",\sreason=0x40189ef1\s"variable\sis\n\s\s\s\sarray")\n\s\s\s\s>\s\s\s\s\sat\s./../generic/tclVar.c:4649\n\s\s\s\s>\s#4\s\s0x40173a37\sin\sTclGetIndexedScalar\s(interp=0x804a030,\n\s\s\s\slocalIndex=-124,\n\s\s\s\s>\s\s\s\s\sleaveErrorMsg=1)\sat\s./../generic/tclVar.c:766\n\s\s\s\s>\s#5\s\s0x40137776\sin\sTclExecuteByteCode\s(interp=0x804a030,\n\s\s\s\scodePtr=0x8196e70)\n\s\s\s\s>\s\s\s\s\sat\s./../generic/tclExecute.c:1070\n\s\s\s\s>\s#6\s\s0x40113c9a\sin\sTcl_EvalObjEx\s(interp=0x804a030,\sobjPtr=0x807f1c0,\n\s\s\s\sflags=0)\n\s\s\s\s>\s\s\s\s\sat\s./../generic/tclBasic.c:2699\n\s\s\s\s>\s#7\s\s0x40169c97\sin\sTclObjInterpProc\s(clientData=0x8051b40,\n\s\s\s\sinterp=0x804a030,\n\s\s\s\s>\s\s\s\s\sobjc=1,\sobjv=0xbfffee40)\sat\s./../generic/tclProc.c:995\n\s\s\s\s>\s#8\s\s0x4016089f\sin\sEvalObjv\s(interp=0x804a030,\sobjc=1,\n\s\s\s\sobjv=0xbfffee40,\n\s\s\s\s>\s\s\s\s\scommand=0x404a94d2\s"\\n\\n\\n\\n#",\s'-'\s<repeats\s30\stimes>,\s"\\n#\n\s\s\s\sHere's\sthe\sreal\n\s\s\s\s>\s\sprogram...\\n#\s\s\sNot\svery\simpressive,\shuh?\\n#",\s'-'\s<repeats\s30\n\s\s\s\stimes>,\s"\\n\\nIni\n\s\s\s\s>\st\\nBuildMainFrame\\n#\sIf\scmd\sline\sarg\sspecified\sa\sfile,\sopen\sup\sa\n\s\s\s\swindow"...,\n\s\s\s\s>\s\s\s\s\slength=428,\sflags=0)\sat\s./../generic/tclParse.c:923\n\s\s\s\s>\s#9\s\s0x401611a8\sin\sTcl_EvalEx\s(interp=0x804a030,\n\s\s\s\s>\s\s\s\s\sscript=0x403ff008\s"#!/bin/sh\\n#\sthe\snext\sline\srestarts\susing\swish\n\s\s\s\s\\\\\\nexec\sw\n\s\s\s\s>\sish\s\\"$0\\"\s\\"$@\\"\\n#\s\sTkZip\s\sCopyright\s©\s1996,\s1998\sby\sRobert\n\s\s\s\sWoodside.\\n#\s\sA\sT\n\s\s\s\s>\sk/Tcl\sprogram\sfor\smanaging\szipped\s&\starred\sarchives\\n\\n#",\s'-'\n\s\s\s\s<repeats\s18\stimes\n\s\s\s\s>\s>...,\snumBytes=697974,\sflags=0)\sat\s./../generic/tclParse.c:1384\n\s\s\s\s>\s#10\s0x40155e3f\sin\sTcl_EvalFile\s(interp=0x804a030,\n\s\s\s\s>\s\s\s\s\sfileName=0xbffff26c\s"./TkZipt")\sat\s./../generic/tclIOUtil.c:323\n\s\s\s\s>\s#11\s0x4003face\sin\sTk_MainEx\s(argc=1,\sargv=0xbffff3a8,\n\s\s\s\s>\s\s\s\s\sappInitProc=0x804881c\s<Tcl_AppInit>,\sinterp=0x804a030)\n\s\s\s\s>\s\s\s\s\sat\s./../generic/tkMain.c:229\n\s\s\s\s>\s#12\s0x804880e\sin\smain\s(argc=2,\sargv=0xbffff3a4)\sat\s./tkAppInit.c:54\n\s\s\s\s>\s#13\s0x804874e\sin\s___crt_dummy__\s()\n\s\s\s\s>\s(gdb)\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\n\s\s\s\s\n\s\s\s\sThe\s"error"\sbeing\sreported\sin\sVarErrMsg\sis\sclearly\sbogus,\sand\sthe\n\s\s\s\sinterpreter\n\s\s\s\shas\sgot\sits\saddressability\smessed\sup\ssomewhere\sprior\sto\sthis.\n\s\s\s\s\n\s\s\s\sOver\sseveral\syears\sof\s"feeping\screaturism",\sthe\sprogram\shad\sacquired\n\s\s\s\sa\svery\slarge\snumber\sof\sglobal\sscalar\svariables,\sand\smost\sof\sthe\scode\n\s\s\s\sprior\sto\n\s\s\s\sthis\spoint\sis\sjust\sinitializing\sthem.\sI\sfound\sthat\sif\sI\smashed\sabout\s40\n\s\s\s\sor\sso\n\s\s\s\sof\sthem\sinto\sone\sindexed\sarray,\sthe\sproblem\swent\saway,\sso\sI\sembarked\son\n\s\s\s\sa\smajor\n\s\s\s\scode\scleanup\sas\sa\sworkaround.\n\s\s\s\s\n\s\s\s\sIf\syou\sneed\sany\sadditional\sinformation,\splease\sdon't\shesitate\sto\n\s\s\s\scontact\sme.\n\nDesiredBehavior:\nUm...I'd\sexpect\sto\ssee\sthe\sTcl\sinterpreter\snot\ssegfault,\sor\stry\sto\n\s\s\s\sreport\sbogus\serrors.\n\n\n\nFixed\sin\s8.2.[12].\s\n--\s11/08/1999\shobbs
J foundin obsolete:\s8.1
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 10.\sObjects
J title Segfault\sin\slarge\spgm\swith\slarge\sno.\sof\sscalar\sglobals
J type Bug
K 218775ffffffffffffffffffffffffffffffffff
U nobody
Z d5b0543f194c74212b835551b914414e