Skip to content
Tcl Source Code Artifact [cf8645dafd]
Login

Artifact [cf8645dafd]

Artifact cf8645dafd7a760d297205f263e755a53c6bdde4:

Ticket change [cf8645dafd] - New ticket [218982ffffffffff|218982ffff] <i>Unsetting array with element traces causes Tcl to abort</i>. by nobody on 2000-10-26 01:08:55.
D 2000-10-26T01:08:55
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s3453\sBug\nVersion:\s8.0p2\nSubmitDate:\s'1999-11-05'\nLastModified:\s'2000-01-14'\nSeverity:\sMED\nStatus:\sReleased\nSubmitter:\stechsupp\nChangedBy:\sericm\nOS:\sSolaris\nOSVersion:\s2.6\nFixedDate:\s'2000-01-14'\nFixedInVersion:\s8.3\nClosedDate:\s'2000-10-25'\n\n\nName:\nMark\sA.\sWege\n\nComments:\nThe\scode\salso\sfails\sunder\sTcl\s7.4.\n\s\s\s\s\nThe\scode\sdoes\sNOT\sfail\sif\sthe\sarray\svariable\sis\sunset\sin\sa\sprocedure\ninstead\sof\sthe\sglobal\sscope.\s\sIt\salso\sdoesn't\sfail\sif\syou\sremove\sthe\nglobal\sstatement\sfrom\sthe\sshowtrace\sprocedure.\n\nReproducibleScript:\nThe\sfollowing\sscript\sis\sa\spart\sof\ssome\scode\sI've\swritten\sto\shelp\speople\ntrack\sdown\sproblems\sin\stheir\scode\sby\ssetting\straces\son\svariables\sto\ssee\nwhere\stheir\svalues\sare\sbeing\schanged.\s\sTo\sexecute\sthis,\seither\sexecute\ntclsh\sinteractively\sand\spaste\sthis\scode\sinto\sthe\ssession,\sor\splace\sthe\ncode\sinto\sa\sfile\sand\sthen\sexecute\stclsh\swith\sthe\sfile\sas\sa\sparameter:\n\nproc\sshowtrace\s{var\sind\sop}\s{\n\s\s\s\sglobal\st\n\s\s\s\sputs\s"showtrace:\svar\s=\s$var\s\s\sind\s=\s$ind\s\s\sop\s=\s$op"\n}\nset\st(1)\s1\ntrace\svariable\st(1)\su\sshowtrace\nunset\st\n\nObservedBehavior:\nWhen\sthe\scode\sis\sexecuted,\stclsh\sprovides\sthe\sfollowing\soutput\sand\nthen\scrashes:\n\s\s\s\s\nshowtrace:\svar\s=\st\s\s\sind\s=\s1\s\s\sop\s=\su\nmalformed\sbucket\schain\sin\sTcl_DeleteHashEntry\nAbort\s(core\sdumped)\n\nDesiredBehavior:\nTcl\sshould\sbe\sable\sto\sunset\sthe\sarray\svariable\swithout\scrashing.\n\n\nConfirmed\sin\s8.2.2.\s\sWorkaround\sis\sto\sexplicitly\sunset\st(1)\nfirst\s(or\sforeach\sover\sarray\snames).\s\n--\s11/10/1999\shobbs\n\nThe\sroot\sof\sthis\sproblem\shad\sto\sdo\swith\sa\sfailure\sto\sprotect\sthe\sarray\svariable\sfrom\sbeing\sdeleted\smultiple\stimes,\swhich\swas\simplicitly\shappening\sin\sthe\scode\sshown:\s\sonce\sfor\sthe\sunset,\sand\sonce\swhen\sthe\scall\sstack\swas\spopped\safter\sfinishing\sthe\sshowtrace\sfunction.\s\sOf\scourse,\sfree'ing\sa\sblock\sof\smemory\stwice\sis\snever\sa\sgood\sthing,\sand\sthis\sultimately\sled\sto\sthe\score\sdump.\n\nI\sfixed\sthe\sbug\sby\sputting\sprotection\sagainst\sthis\ssituation\sin\sthe\sunset\scode.\s\sThe\sfix\swill\sgo\sinto\s8.3.\n-\seric\n\n--\s01/14/2000\sericm\n\n
J foundin obsolete:\s8.0p2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 07.\sVariables
J title Unsetting\sarray\swith\selement\straces\scauses\sTcl\sto\sabort
J type Bug
K 218982ffffffffffffffffffffffffffffffffff
U nobody
Z ceed21910a39a2361433e854f1485ac3