Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:
On Mon, Jan 3, 2011 at 11:43 AM, Brian Curtin <rep...@bugs.python.org> wrote: .. > No crash on 0-day or 300,000. I bumped it up to 3,000,000 and got a > UnicodeDecodeError, although > I'm not sure of the relevance of that to this issue. It looks like we need an XP box with a debug version of the crt lib to reproduce the crash. .. >>>> time.asctime((3000000, 1, 0, 0, 0, 0, 0, 0, 0)) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > UnicodeDecodeError: 'utf8' codec can't decode byte 0xe8 in position 20: > invalid continuation byte Well, undefined behavior is undefined behavior. Arguably, writing binary garbage in a timestamp is better than crashing. (given Windows reputation, I would not be surprised if the above also involves undetected memory corruption, though.) I am convinced that we don't have a choice but to check the input of asctime() beforehand. I am preparing a patch. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10814> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com