Skip to content
Tcl Source Code Artifact [4d6ae66449]
Login

Artifact [4d6ae66449]

Artifact 4d6ae66449ce35ff2c84e4c366708a4b0e00cdff:

Ticket change [4d6ae66449] - Ticket [615304ffffffffff|615304ffff] <i>Tcl_InitStubs crash/exception</i> status still Pending with 4 other changes by nobody on 2002-10-03 02:50:34.
D 2002-10-03T02:50:34
J icomment Logged\sIn:\sNO\s\n\nWhen\sI\sstepped\sthrough\sthe\scode\s(several\stimes)\sto\s\ndiagnose\sthe\sproblem,\sI\snoticed\sthat\sthe\s\nvariable\s"tclStubsPtr"\sis\snever\sbeing\sreset\sto\sNULL.\s\s\nAdditionally,\sit\sdoes\snot\sappear\sto\sever\sbe\sexplicitly\s\ninitialized\sto\sNULL.\n\nCONST\schar\s*\nTcl_InitStubs\s(interp,\sversion,\sexact)\n\s\s\s\sTcl_Interp\s*interp;\n\s\s\s\sCONST\schar\s*version;\n\s\s\s\sint\sexact;\n{\n\s\s\s\sCONST\schar\s*actualVersion;\n\s\s\s\sTclStubs\s*tmp;\n\s\s\s\n\s\s\s\sif\s(!tclStubsPtr)\s{\n\n//***\sNOTE:\sThe\sfirst\stime\sthrough\shere,\sthe\stclStubsPtr\s\nis\sset\sto\sthe\sone\sfrom\sthe\sinterp.\n//***\sSince\sthe\stclStubsPtr\sis\snever\sexplicitly\sreset\s(at\s\nleast,\snot\sthat\sI\scan\sfind),\sthis\scode\sis\snot\sexecuted\sthe\s\nsecond\stime\sthrough.\n\ntclStubsPtr\s=\sHasStubSupport(interp);\nif\s(!tclStubsPtr)\s{\n\s\s\s\s\s\s\s\s\s\s\s\sreturn\sNULL;\n\s\s\s\s\s\s\s\s}\n\s\s\s\s}\n\n//***\sI'm\snot\ssure\swhat\sthe\s"tmp"\svariable\shere\sis\sdoing.\n//***\sUpon\sclose\sexamination,\sI\sbelieve\sthe\scause\sof\sthe\s\ncrash\sis\sa\sbad\saddress\sfor\sTcl_PkgRequireEx,\sas\sthis\sis\sa\s\nmacro\sdefined\sto\sbe\s"tclStubsPtr->tcl_PkgRequireEx".\n//***\sSince\sthe\stclStubsPtr\svariable\sdoes\snot\sreally\sexist\s\nin\sa\sknown\sstate\safter\sthe\sfirst\stime\saround\s(or\sreally,\sat\s\nall),\sby\sthe\stime\sthe\ssecond\stime\sroles\saround\sthere\sis\s\nsomehow\stotal\sgarbage\sin\sthe\stclStubsPtr\sthat\sa\ssimple\s\ncall\sto\sHasStubSupport\sseems\sto\sfix.\s\sThis\sis\sdue\sto\sthe\s\nfact\sthat\sTcl_CreateInterp\sactually\ssets\sup\sthe\sinternal\s\nstubs\stable\sinside\sthe\sinterp\sprior\sto\sTcl_InitStubs\sever\s\nbeing\scalled,\sand\sI\sbelieve\sthat\sTcl_InitStubs\sshould\s\nalways\srely\son\sthose\svalues\salone.\n\n\s\s\s\sactualVersion\s=\sTcl_PkgRequireEx(interp,\s"Tcl",\s\nversion,\sexact,\n\s\s\s\s(ClientData\s*)\s&tmp);\n\s\s\s\sif\s(actualVersion\s==\sNULL)\s{\ntclStubsPtr\s=\sNULL;\nreturn\sNULL;\n\s\s\s\s}\n\n\s\s\s\sif\s(tclStubsPtr->hooks)\s{\ntclPlatStubsPtr\s=\stclStubsPtr->hooks-\n>tclPlatStubs;\ntclIntStubsPtr\s=\stclStubsPtr->hooks-\n>tclIntStubs;\ntclIntPlatStubsPtr\s=\stclStubsPtr->hooks-\n>tclIntPlatStubs;\n\s\s\s\s}\selse\s{\ntclPlatStubsPtr\s=\sNULL;\ntclIntStubsPtr\s=\sNULL;\ntclIntPlatStubsPtr\s=\sNULL;\n\s\s\s\s}\n\s\s\s\s\n\s\s\s\sreturn\sactualVersion;\n}\n\nJJM\n\n
J login nobody
J mimetype text/plain
J username nobody
K 615304ffffffffffffffffffffffffffffffffff
U nobody
Z 1e8785877a32a3d4295fdf684aa035d2