.
D 2009-09-16T19:41:02
J assignee nobody
J cmimetype text/plain
J comment Observed\n--------\nTcl8.4\ssegfaults\swhen\scalling\sTcl_FindCommand()\sfrom\sa\sstubs\senabled\sshared\sobject.\n\nThe\ssegfault\soccurs\sat\sthe\sassembler\sinstruction\s"call",\sand\sthe\sprogram\snever\smakes\sit\sinto\sthe\sfunction.\sAt\sthe\smoment\sof\sthe\scall\sinstruction,\sthe\scpu\sregister\sthat\sholds\sthe\smemory\slocation\sto\swhich\sthe\scall\sis\smade,\sholds\sthe\svalue\s0x0.\n\nRunning\sthe\scode\sfrom\sthe\ssame\sshared\slib\sin\stclsh8.5\s(8.5.7)\sdoes\snot\sexhibit\sthe\sproblem.\n\nSystem\sspecification:\n\n%\sparray\stcl_platform\ntcl_platform(byteOrder)\s=\slittleEndian\ntcl_platform(machine)\s\s\s=\si686\ntcl_platform(os)\s\s\s\s\s\s\s\s=\sLinux\ntcl_platform(osVersion)\s=\s2.6.18.8-0.13-default\ntcl_platform(platform)\s\s=\sunix\ntcl_platform(user)\s\s\s\s\s\s=\serik\ntcl_platform(wordSize)\s\s=\s4\n%\sset\stcl_patchLevel\n8.4.19\n\n\nHow\sto\sreproduce\n----------------\nAttached\sto\sthis\sreport\sis\sthe\scode\sfor\sa\sTcl\sextension\sthat\sregisters\sa\snew\scommand\s"findcommand"\sin\sfile\sfc.c.\sAlso\sattached\sis\sthe\sbuild\sscript\sto\sproduce\sthe\sshared\slib\s"fc.so".\sAssuming\sthe\scompletion\sof\sthe\sbuild,\syou\ssimply\sdo:\n\n>\stclsh8.4\n%\sload\s./fc.so\n%\sfindcommand\swhatever\nSegmentation\sfault\s(core\sdumped)\n\n\nPreliminary\sanalysis\n--------------------\n\nA.\sddd\sinspection\nAttached\syou\sfind\sa\sscreendump\sfrom\sthe\sddd\sdebugger,\sshowing:\n-\sa\sbreakpoint\sat\sthe\sline\sin\sthe\sC\scode\swhere\sthe\scall\sto\sTcl_FindCommand\sis\smade\n-\sthe\sassembler\sinstructions\sfrom\sthat\sbreakpoint\sup\sto\sthe\scall\sinstruction\swhich\sfails.\n-\sthe\scpu\sregisters\sjust\sbefore\sthe\scall\sinstruction.\nNote\sthe\s0x0\svalue\sin\sthe\sedx\sregister.\n\nB.\sbacktrace\sfrom\score\sdump:\ssee\sattached\sfile\sgdb_backtrace.txt\n\n\nPreliminary\sinterpretation\n--------------------------\nSince\sTcl\sitself\shas\scalls\sto\sTcl_FindCommand\sall\sover\sthe\splace\swithout\sthem\sgiving\scause\sto\scomplain,\sthere\smust\sbe\ssomething\sout\sof\sthe\sordinary.\sMaybe\san\sissue\swith\sthe\sstubs\sinterface?\n
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter eriklns
J subsystem None
J title Calling\sTcl_FindCommand()\sfrom\sa\sshared\slib\ssegfaults
J type Bug
K 2860233fffffffffffffffffffffffffffffffff
U eriklns
Z 8542522a2a28821e9b338387e3ba3fb7