.
D 2000-10-26T01:01:46
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s913\sBug\nVersion:\s8.0.3\nSubmitDate:\s'1998-12-04'\nLastModified:\s'1999-04-16'\nSeverity:\sLOW\nStatus:\sReleased\nSubmitter:\swelch\nChangedBy:\sstanton\nOS:\sWindows\sNT\nOSVersion:\sNT4.0\sSP3\nMachine:\sX86\nFixedDate:\s'1999-04-16'\nFixedInVersion:\s8.1b3\nClosedDate:\s'2000-10-25'\n\n\nName:\nJan\sNijtmans\n\nCustomShell:\nplus-patch.\sBut\sbecause\sthis\sproblem\sis\n\nReproducibleScript:\n-\sproduce\sa\sstandalone\sexecutable\son\n\s\sa\ssystem\swhich\sdoesn't\ssupport\n\s\sbacklinking\s(e.g.\sWindows\s95/98/NT).\n\s\s(I\sdid\sthis\swith\sthe\splus-patch,\sbut\n\s\ssince\sthis\sproblem\sis\sgeneric\sI\sam\n\s\ssure\sthat\sthe\sTclPro\swrapper\shas\n\s\sthe\ssame\sproblem)\n-\sdynamicaly\sload\sany\sextension\n\s\s(e.g.\s"package\srequire\sTix")\n\nObservedBehavior:\nUnhandled\sexception.\sThe\sstack\strace\nin\sthe\sabove\sdescribed\scase\slooks\slike\s(although\sI\sdoubt\sit\sis\suseful)\n\nTK80!\s00cafaa2()\nTIX4180!\s10019d92()\nWISH80S!\s0040e097()\nWISH80S!\s0043f879()\nWISH80S!\s0040e966()\nWISH80S!\s0040e72f()\nWISH80S!\s0040fc0c()\nWISH80S!\s004133f5()\nWISH80S!\s0041322a()\nWISH80S!\s00413a1e()\nWISH80S!\s0040e097()\nWISH80S!\s0043f879()\nWISH80S!\s0040e966()\nWISH80S!\s0040fc3c()\nWISH80S!\s00413103()\nWISH80S!\s00412ff3()\nWISH80S!\s00401941()\nWISH80S!\s0040e097()\nWISH80S!\s0043f879()\nWISH80S!\s0040e966()\nWISH80S!\s0041fbcb()\nWISH80S!\s0043f879()\nWISH80S!\s0040e966()\nWISH80S!\s0040e72f()\nWISH80S!\s0040fc0c()\nWISH80S!\s004787f0()\nWISH80S!\s004678fd()\nWISH80S!\s0044bb61()\nWISH80S!\s0044be36()\nWISH80S!\s0041a9ff()\nWISH80S!\s0041ac9d()\nWISH80S!\s0044bea0()\nWISH80S!\s004010b8()\nWISH80S!\s00402146()\nKERNEL32!\s77f1b304()\n\nDesiredBehavior:\nnice\serror\smessage:\s"Cannot\sload\spackage\sin\sstatically\slinked\sexecutable",\sor\ssomething\slike\sthat.\nThe\spatch\sbelow\sis\sable\sto\scatch\nthis\skind\sof\serror,\sbefore\sanything\nbad\shappens.\s(The\ssame\scan\shappen\nwith\sany\sglobal\svariable\sin\stcl.dll\nor\stk.dll,\sbut\stclEmptyStringRep\sis\nthe\seasiest\sto\scheck\sfor).\sI\stested\nthis\son\sWindows\sNT4/SP3.\n\nPatch:\n***\sgeneric/tclPkg.c.origThu\sApr\s02\s00:39:49\s1998\n---\sgeneric/tclPkg.cTue\sNov\s17\s15:29:57\s1998\n***************\n***\s150,155\s****\n---\s150,173\s----\n\s\s\s\s\s\sTcl_DString\scommand;\n\n\s\s\s\s\s\s/*\n+\s\s\s\s\s\s*\s\sTest\sif\sglobal\svariables\sare\scorrectly\sinitialized.\sIf\snot,\n+\s\s\s\s\s\s*\s\sthe\sonly\sexplanation\sis\sthat\swe\sare\strying\sto\sload\sa\sbinary\n+\s\s\s\s\s\s*\s\spackage\sinto\sa\sstatically\slinked\sexecutable\son\sa\ssystem\n+\s\s\s\s\s\s*\s\swhich\sdoesn't\ssupport\sbacklinking\s(e.g.\sWindows,\sAIX).\sIn\n+\s\s\s\s\s\s*\s\sthat\scase\sthere\sare\stwo\sglobal\svariables\s"tclEmptyStringRep":\n+\s\s\s\s\s\s*\s\sone\sin\sthe\sstatic\sexecutable\sand\sone\sin\sthe\sshared\sTcl\n+\s\s\s\s\s\s*\s\slibrary.\sIf\swe\sare\saddressing\sthe\swrong\sone\shere\s(and\sthat\n+\s\s\s\s\s\s*\s\sis\swhat\shappens\sif\swe\stry\sdynamical\sloading),\sit's\sbetter\n+\s\s\s\s\s\s*\s\sto\sproduce\sa\snice\serror\smessage,\sthan\shaving\sa\scrash\slater.\n+\s\s\s\s\s\s*/\n+\s\n+\s\s\s\s\sif\s(!tclEmptyStringRep)\s{\n+\s\s\s\s\s\s\s\s\sTcl_AppendResult(interp,\s"Cannot\sload\spackage\s\\"",\sname,\s\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s"\\"\sin\sstatically\slinked\sexecutable",\sNULL);\n+\s\s\s\s\s\s\s\s\sreturn\sNULL;\n+\s\s\s\s\s}\n+\s\n+\s\s\s\s\s/*\n\s\s\s\s\s\s\s*\sIt\scan\stake\sup\sto\sthree\spasses\sto\sfind\sthe\spackage:\s\sone\spass\sto\n\s\s\s\s\s\s\s*\srun\sthe\s"package\sunknown"\sscript,\sone\sto\srun\sthe\s"package\sifneeded"\n\s\s\s\s\s\s\s*\sscript\sfor\sa\sspecific\sversion,\sand\sa\sfinal\spass\sto\slookup\sthe\n\nPatchFiles:\ntclPkg.c\n\n\n\nExplanation\show\sthis\ssolution\sworks:\nIf\sthe\ssystem\sdoesn't\ssupport\sbacklinking,\sthere\sare\stwo\sglobal\svariables\s"tclEmptyStringRep":\sone\sin\sthe\sstatic\sexecutable\sand\sone\sin\sthe\sshared\sTcl\slibrary.\sIf\sthe\sfunction\nTcl_PkgRequire()\s(which\sis\susually\nthe\sfirst\sfunction\sin\sthe\sextension)\nis\sexecuting\sin\sa\sonly\spartly\ninitialized\sdll,\sthat\sis\sasking\sfor\ntrouble.\n\nOn\sAIX\sit\sis\scurrently\simpossible\sto\sdo\sthis,\sbecause\s--disable-load\sis\scoupled\swith\s--enable-shared.\sWith\sthis\schange,\sit\swould\sbe\spossible\sto\sremove\sthis\scoupling:\sThere\swill\sstill\san\serror\nmessage\sbe\sgenerated\sif\sthe\sused\stries\nto\sdo\sdynamical\sloading.\n\n(B.T.W,\sit\sis\spossible\sto\sproduce\slibraries\swhich\scan\sbe\sdynamically\sloaded\son\sAIX\sin\sstatically\slinked\sexecutables.\sPaul\sDuffin\sis\sworking\son\sthat,\swith\svery\sgood\sresults)\n\nThis\sis\sincorporated\sby\sthe\sstubs\spatches.\n04/16/1999\s14:44\s-\sstanton\s-\n\n
J foundin obsolete:\s8.0.3
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 69.\sOther
J title dynamical\slinking\sin\sstandalone\sexecutables
J type Bug
K 218530ffffffffffffffffffffffffffffffffff
U nobody
Z 46be955641067d63b6f8dfa954e012dc