<i>indexObj.test failures on i386</i> status still Open with 3 other changes
by
.
D 2023-05-07T15:16:02.951
J icomment I\swould\ssay\sthese\sfailures\sare\sbecause\s<tt>endValue</tt>\sin\s<tt>GetWideForIndex()</tt>\sand\s<tt>GetEndOffsetFromObj()</tt>\sis\s<tt>size_t</tt>,\si.e.\s32-bit\sunsigned,\sand\smust\sbe\swidened\sto\s<tt>Tcl_WideInt</tt>\sin\sthis\sstatement\sin\s<tt>GetEndOffsetFromObj()</tt>:\r\n<pre>\r\n\t/*\sDifferent\ssigns,\ssum\scannot\soverflow\s*/\r\n\t*widePtr\s=\sendValue\s+\soffset\s+\s1;\r\n</pre>\r\nThe\sresult\sof\sthis\sstatement\sis\sstored\sin\s<tt>wide</tt>\sin\s<tt>Tcl_GetIntForIndex()</tt>\swhich\sthen\sgets\scapped\sto\s<tt>INT_MAX</tt>\sfor\sthese\sfailing\stests.\r\n\r\nBut\strying\s<tt>(ssize_t)endValue</tt>\sjust\sin\sthe\sstatement\sabove\sbreaks\sinit.tcl,\sso\smaybe\sthere\sis\smore\sto\sthe\sproblem.\r\n\r\nAnd\srather\sthan\strying\sto\streat\s<tt>endValue</tt>\sas\ssigned\sin\sone\sspot,\smaybe\sit\scan\sbe\smade\s<tt>Tcl_WideInt</tt>,\sas\sdone\sby\sTIP\s660\sfor\s9.0;\sI\sthink\sthat\smight\sbe\sappropriate\ssince\s<tt>endValue</tt>\scomes\sfrom\seither\sa\s<tt>Tcl_WideInt</tt>\s(from\sa\sTcl\svalue)\sor\san\s<tt>int</tt>.
J login chrstphrchvz
J mimetype text/x-fossil-wiki
K 44452e2c5522c3e81d4ab6bcbd05fae0ad4c6d98
U chrstphrchvz
Z f79648b97f178eed92814846d14d0f77