Skip to content
Tcl Source Code Artifact [23b5544ff3]
Login

Artifact [23b5544ff3]

Artifact 23b5544ff36f6bd335839a193ded02ee67d2bb56:

Ticket change [23b5544ff3] - New ticket [a3fb3356b76ec4a8|a3fb3356b7] <i>Segmentation fault due to int overflow in GrowEvaluationStack</i>. by victorb on 2017-05-29 12:23:18.
D 2017-05-29T12:23:18.477
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment In\sGrowEvaluationStack(ExecEnv\s*eePtr,\sint\sgrowth,int\smove),\sthe\s"growth"\sargument\sis\sof\sthe\ssigned\sint\stype\swhich\smeans\sthat\sthis\sAPI\scannot\sbe\sused\sto\sallocate\smore\sthan\s2GB\sof\smemory.\sThere\sis\sno\srange\scheck\seither,\sso\sif\sa\sTcl\scommand\stries\sto\sallocate\smore\sthan\s2GB,\sthe\sAPI\sjust\ssilently\scorrupts\smemory.\r\n\r\nSpecifically,\sthe\sbug\swas\sfound\sby\strying\sto\sdo\slsort\son\sa\svery\slarge\slist.\r\n\r\na)\screate\sa\svery\slarge\slist\s(e.g.\s108707840\sentries)\sof\sstring,\scalled,\sfor\sexample,\s$names.\r\n\r\nb)\ssort\sand\suniquify\sthe\slist:\r\nset\ssorted_unique_names\s[lsort\s-unique\s$names]\s#\sThis\swill\scause\sa\smemory\serror\r\n\r\nThe\stop\sof\sthe\sstacktrace\sis:\r\n#0\s\s0x0000000014700aa1\sin\sGrowEvaluationStack\s(eePtr=0x1e2c9a80,\s\r\n\s\s\s\sgrowth=-210747392,\smove=0)\r\n\s\s\s\sat\s/global/sde_apps/tcl/m/prod/tcl/tcl8.6/generic/tclExecute.c:1124\r\n#1\s\s0x000000001470172f\sin\sStackAllocWords\s()\r\n\s\s\s\sat\s/global/sde_apps/tcl/m/prod/tcl/tcl8.6/generic/tclExecute.c:1252\r\n#2\s\s0x0000000014702302\sin\sTclStackAlloc\s(interp=0x1e2c6c00,\s\r\n\s\s\s\snumBytes=-1685979136)\r\n\s\s\s\sat\s/global/sde_apps/tcl/m/prod/tcl/tcl8.6/generic/tclExecute.c:1349\r\n#3\s\sTcl_LsortObjCmd\s(clientData=0x0,\sinterp=0x1e2c6c00,\sobjc=3,\s\r\n\s\s\s\sobjv=0x1e2d4e70)\r\n\s\s\s\sat\s/global/sde_apps/tcl/m/prod/tcl/tcl8.6/generic/tclCmdIL.c:3960
J foundin 8.6
J is_private 0
J login victorb
J priority 5\sMedium
J private_contact 6c72cad08b0f1956fbe1a370500e97a6c84dc157
J resolution None
J severity Severe
J status Open
J submitter victorb
J subsystem 41.\sMemory\sAllocation
J title Segmentation\sfault\sdue\sto\sint\soverflow\sin\sGrowEvaluationStack
J type Bug
K a3fb3356b76ec4a853d1b86aadc08675f8bef359
U victorb
Z bab45ee05dba62d0bb91a25074beef47