<i>Unset PATTERN unsafe with trace-originated secondary unsets</i> status still Open with 4 other changes
by
.
D 2010-02-03T16:46:16
J icomment Your\spatch\sis\sstill\swrong.\s;-)\n\nMore\simportantly,\sthe\swhole\ssemantics\sfor\show\syou're\sgoing\sabout\sit\sis\swrong\stoo,\sand\sno\ssingle-iteration\sstrategy\scan\sfix\sit.\sTo\sshow\swhat\sI\smean,\shere's\sa\ssample\ssession\s(using\sthe\sHEAD,\sbut\sapply\sany\sfixes\syou\swant...)\n\n%\strace\sadd\svariable\sfoo\sunset\s{apply\s{{a\sb\sc}\s{if\s{$b\seq\s"b"}\s{global\sfoo;\sfor\s{set\si\s0}\s{$i<100}\s{incr\si}\s{set\sfoo($i)\s1}}}}}\n%\sarray\sset\sfoo\s{b\s1\sf\s1\sj\s1}\n%\sparray\sfoo\nfoo(b)\s=\s1\nfoo(f)\s=\s1\nfoo(j)\s=\s1\n%\sarray\sunset\sfoo\s*\n%\sparray\sfoo\nfoo(35)\s=\s1\nfoo(36)\s=\s1\nfoo(37)\s=\s1\n\nThe\sfundamental\sissue\sis\sthat\swhen\san\sunset\strace\stinkers\swith\sthe\scontents\sof\sthe\sarray,\s[array\sunset]'s\ssemantics\sgo\shaywire.\sThe\sonly\sthing\sI\scan\sthink\sof\sto\sfix\sthis\sis\sto\suse\sa\smulti-step\sdeletion\sprocess\swhich\sfirst\scalculates\swhich\selements\sto\skill\sand\sthen\snukes\sthem\swhile\scalling\straces.\s(The\sconfusion\sabout\swhat\shappens\swhen\sa\strace\supdates\san\selement\sthat\sis\sabout\sto\sbe\sdeleted\svs\sone\sthat\shas\salready\sbeen\sdeleted\sis\sprobably\san\sindication\sthat\swe'll\sjust\shave\sto\sbe\scareful.)\sI\ssuggest\ssnapshotting\s(into\sa\sC\sarray)\sat\sthe\sstart\sis\ssanest,\sand\slets\sus\savoid\sproblems\swith\sthe\siterator's\sinternal\spointer\sentirely.\n
J login dkf
J mimetype text/plain
J username dkf
K 2939073fffffffffffffffffffffffffffffffff
U dkf
Z a74cc8e81858d559d27636373ff5930a