<i>SegFault on [info frame] on apply</i> status still Pending with 3 other changes
by
.
D 2026-08-27T03:31:55.214
J icomment Sergey,\sI\sfeel\sthe\sfix\sproposed\swill\ssolve\sthis\sissue\sbut\sthere\sis\sa\sdeeper,\smore\sserious\sproblem\sas\syour\squestion\sabout\sprocPtr\simplies.\sWhat\sI\ssee\sis\sthat\sthe\stest\sscript\sinvokes\s`TclInfoFrame`\s(via\s`InfoFrameCmd`)\sthree\stimes.\sOn\sthe\sthird\sinvocation,\sdebugger\sshows\son\sentry\sto\s`TclInfoFrame`,\sthe\sfollowing\svalues:\r\n\r\n```\r\nCmdFrame\s*\s\sframePtr\s0x0000020cb5b10ef8\r\nCallFrame\s*\sframePtr->framePtr\s0x0000020cb5b10db0\r\nProc\s*\s\s\s\s\s\sframePtr->framePtr->procPtr\s0x0000020cb5ce4b08\r\nCommand\s*\s\s\sframePtr->framePtr->procPtr->cmdPtr\s0x0000020cb5b110b0\r\n```\r\n\r\nNote\sthe\slast\svalue\sin\sparticular.\sThen\sthe\sline\s[fptr\s=\sTclStackAlloc](https://core.tcl-lang.org/tcl/file?ci=9ec5286ed2fe765c&name=generic%2FtclCmdIL.c&ln=1299)\sreturns\s0x0000020cb5b110a0.\sSince\ssizeof(*fptr)\sis\s88,\sthis\sallocation\soverlaps\sthe\smemory\sreferenced\sby\sframePtr->framePtr->procPtr->cmdPtr.\sConsequently,\sthis\s[line](https://core.tcl-lang.org/tcl/file?ci=9ec5286ed2fe765c&name=generic%2FtclExecute.c&ln=9762)\soverwrites\s`framePtr->framePtr->procPtr->cmdPtr->hPtr`\scausing\sthe\scrash.\sBut\sin\sthe\smeanwhile\splenty\sof\sother\sfields\sare\salso\scorrupted,\sthis\sis\smerely\sthe\sone\shitting\sa\scrash\sfirst.\r\n\r\nIt\sseems\sto\sme\sthat\ssome\scode\spath\sis\sreleasing\smemory\sallocated\sby\sTclStackAlloc\stoo\searly,\sresulting\sin\sthat\smemory\sbeing\soverwritten\swhile\sstill\sin\suse.\sI\sdon't\sunderstand\sthe\sruntime\sframe\smanagement\senough\sso\syou\smight\sbe\sable\sto\stell\sif\sthat\sis\sthe\scase\sand\swhere\sit\sis\shappening\smuch\squicker\sthan\sI\scould.
J login apnadkarni
J mimetype text/x-markdown
K e533296a92d890449603ce54a5b1e2f04912e68a
U apnadkarni
Z a91b06ad36f435cf20a0136f98b7589f