.
D 2012-09-04T15:38:00
J assignee msofer
J cmimetype text/plain
J comment I've\srecently\stracked\sdown\sa\scrash\sthat\swas\sdue\sto\sfaulty\scoding\sin\san\sincrTcl\smethods,\showever,\sI\sdon't\sknow\sif\sthis\sis\sa\sknown\s"problem"\swith\sincrTcl,\sor\sa\sbug\sin\sthe\s8.5.8+34\scombination,\sor\sjust\sthe\sway\sthings\sare.\s\sI'm\salso\swondering\sif\sthere\sshouldn't\sbe\sa\sruntime\scheck\sfor\sthis\scondition.\n\nSo\swhat\sis\sthe\sproblem?\n\nitcl::class\sDog\s{\nvariable\sbite\nmethod\sbark\s{}\n}\n\nitcl::body\sDog::bark\s{}\s{\nvariable\sbite\nset\sbite\sfalse\nputs\s"Bark!"\n}\n\nThe\scrash\sis\sdue\sto\sthe\sunnecessary\s"variable"\sstatement\sin\sthe\sitcl::body.\s\sIt\sends\sup\scorrupting\sthe\sheap.\s(Thanks\sfor\sTCL_MEM_DEBUG!)\s\s\n\n$\stclsh8.5\n%\spackage\srequire\sItcl\n3.4\n%\smemory\svalidate\son\n%\sitcl::class\sDog\s{\n\s\s\s\s\s\s\s\svariable\sbite\n\s\s\s\s\s\s\s\smethod\sbark\s{}\n}\n%\sitcl::body\sDog::bark\s{}\s{\n\s\s\s\s\s\s\s\svariable\sbite\n\s\s\s\s\s\s\s\sset\sbite\sfalse\n\s\s\s\s\s\s\s\sputs\s"Bark!"\n}\n%\sDog\sfido\nfido\n%\sfido\sbark\nhi\sguard\sbyte\s0\sis\s0x62\s\s\s\s\s\s\s\s\sb\ntotal\smallocs\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s114496\ntotal\sfrees\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s103026\ncurrent\spackets\sallocated\s\s\s\s\s\s11470\ncurrent\sbytes\sallocated\s\s\s\s\s\s\s482362\nmaximum\spackets\sallocated\s\s\s\s\s\s15640\nmaximum\sbytes\sallocated\s\s\s\s\s\s\s630832\nhigh\sguard\sfailed\sat\s81ba7f8,\s.../tcl/unix/../generic/tclHash.c\s344\n8\sbytes\sallocated\sat\s(.../incrTcl/itcl/generic/itcl_migrate.c\s130)\nMemory\svalidation\sfailure\nAbort(coredump)\n
J foundin obsolete:\s8.5.12
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter bgriffin
J subsystem 21.\s[namespace]
J title Tcl8.5\s+\sincrTcl3.4\s[variable]\scrash
J type Bug
K 3564735fffffffffffffffffffffffffffffffff
U bgriffin
Z 5af933bbd8e09688dbbfedae033d13f8