<i>SEGV in Tcl_UtfToUniChar with unaligned string</i> status still Open with 4 other changes
by
.
D 2005-02-15T05:19:07
J icomment Logged\sIn:\sYES\s\nuser_id=1219284\n\nWhile\sdifficult\sto\sreproduce,\sthis\sdoes\snot\smean\sthat\sthe\nbug\sshould\sbe\sshelved.\n\nIn\sorder\sto\sreproduce\sreliably,\syour\sstack\smust\sallocate\nFontMapLoadPage's\sbuf\sarray\sstarting\son\san\sodd\sbyte,\son\sa\nplatform\sthat\scares\sabout\sbyte\salignment.\s\sI\scannot\sprovide\na\stestcase\sthat\sdoes\sthis\sfor\syou\ssince\sit\sdepends\son\stoo\nmany\sfactors.\n\nFrom\sthe\sdebugger,\sit\sis\sclear\sthat\sin\smy\ssession,\sbuf\sended\nup\son\san\sodd\sbyte\s(0xffffffff7fff3ab1).\s\sSince\nTcl_UtfToUniChar()\sthinks\sit's\slooking\sat\san\sarray\sof\s2-byte\nelements,\sdereferencing\sany\selement\swithin\sthis\sarray\swill\ncause\sa\sbus\serror\s(sorry,\sI\sthink\sI\ssaid\sSEGV\searlier).\n\nI\splan\son\sresolving\sthis\slocally\sby\susing\sa\stemporary\nTcl_UniChar\svariable\sand\smemcpying\sit\sback\sto\sthe\s'chPtr'\npointer.\s\sIt\swould\salso\sbe\ssufficient\sto\schange\s'char\nbuf[16]'\sin\sFontMapLoadPage\sto\sa\sTcl_UniChar\sarray,\swhich\nwill\salways\sbe\saligned\sproperly.\n\nJeff\n\n
J login jtbrubaker
J mimetype text/plain
J username jtbrubaker
K 1122671fffffffffffffffffffffffffffffffff
U jtbrubaker
Z dfe1f4e76980cb633f499a27d3efa0aa