D 2023-04-12T15:33:52.445
J comment I\sexpect\slindex\swith\sindices\slarger\sthan\slist\ssize\sto\sreturn\sempty\sstring.\sThis\sis\sthe\scase\swith\ssmall\slseq\sranges\sbut\snot\slarge\sones\s(64-bit\sbuild)\r\n\r\n```\r\n%\slindex\s[lseq\s0x10]\s0x11\s->\scorrectly\sreturns\sempty\sstring\r\n%\slindex\s[lseq\s0x7fffffff]\s0x80000000\s\s->\sgenerates\serror\sinstead\r\nindex\s2147483648\sis\sout\sof\sbounds\s0\sto\s2147483646\r\n%\r\n```\r\n\r\nAnother\spossibly\srelated\s(on\s32-bit\sbuild).\sThis\smay\sbe\srelated\sto\ssigned/unsigned\sindexing\sand\smay\sgo\saway\swith\sTIP\s660.\r\n\r\n```\r\n%\slindex\s[lseq\s0xffffffff]\s0x80000000\s->\sshould\sreturn\s2147483648\r\n%\r\n```\r\n\r\nFinally,\ssome\scheck\s(and\sexception)\sis\sneeded\swhen\slist\slimit\sis\sexceeded.\sThe\sfollowing\son\s*32-bit*\sTcl\sshould\sgenerate\san\serror\ssince\sthe\sfull\srange\sof\selements\scannot\sbe\saccessed\sby\sindexing.\r\n\r\n```\r\n%\sllength\s[lseq\s0x100000000]\r\n0\r\n```\r\n\r\nI\shave\snot\stried\sthis\son\sthe\stip-636\sbranch.\r\n\r\n/Ashok
J login apnadkarni
J mimetype text/plain
K fa00fbbbabe2d77904ac0086884d5debf9c529a5
U apnadkarni
Z 78add51f22bf0afd8293c73bf8f58f93