<i>segfault in test encoding-24.2 (8.5)</i> status still Open with 4 other changes
by
.
D 2009-11-16T17:34:38
J icomment Got\sit\snow.\sMechanism:\n\s\s\s-\swhen\san\sescape\sencoding\sis\sloaded,\sas\sa\sside-effect\sit\sthat\sits\ssub-encodings\sget\sin\sthe\sencoding\stable\swith\srefcount\s1.\n\s\s\s-\sat\sfinalization\stable,\sthe\swhole\scontents\sof\sthe\stable\sare\spurged.\n\s\s\s-\swhen\san\sescape\sencoding\sis\spurged,\sthe\ssub-encodings\sget\spurged\srecursively\s(EscapeFreeProc).\n\s\s\s-\s*if*\sthe\sfinal\s(refcount==1)\spurge\sof\sa\ssub-encoding\soccurs\s*first*\sfrom\swithin\sthis\ssub\sscan,\sit\sgets\sproperly\sremoved\sfrom\sthe\stoplevel\stable\n\s\s-\s*if*\sthe\s(random)\stable\shash\sorder\smakes\sit\sso\sthat\sthe\spurge\soccurs\s*first*\sat\stoplevel,\sthen\sthe\sencoding\sgets\snuked\swhile\sbeing\sstill\sreferenced\sas\sa\ssub.;\sits\spointer\ssoon\sgets\sa\sstab\sin\sthe\ssub\sscan\s-->\sCRASH.\n\nNote\sthat\sincr'ing\srefcount\son\ssub\screation\sis\snot\san\soption,\sbecause\swe'd\sthen\sleak\sa\sref\sat\stoplevel,\shence\sin\sa\snon-finalization\scase\s(freeing\san\sisolated\sescape\sencoding),\swe'd\sleak\sthe\ssubs.\n\nThis\sall\sis\sa\scase\swhere\ssomething\slike\sweak\sreferences\swould\shelp,\sbut\swe\shave\sonly\sstrong\sones\shere.\n\nA\ssimpler\sfix\sshould\sbe\sto\sdetect\sthe\sfinalization\scase\sand\srefrain\sfrom\sthe\ssub-scan\sFreeEnc()\sloop\sin\sEscapeFreeProc.\n\s\n
J login ferrieux
J mimetype text/plain
J username ferrieux
K 2891556fffffffffffffffffffffffffffffffff
U ferrieux
Z ab597ccea192a7d09b41811a278231a6