[issue10814] assertion failed on Windows buildbots
report at bugs.python.org
Mon Jan 3 18:09:54 CET 2011
Antoine Pitrou <pitrou at free.fr> added the comment:
I can reproduce under Windows 7, 32-bit debug build, with the following line:
time.asctime((12345, 1, 0, 0, 0, 0, 0, 0, 0))
Apparently, the debugger tells me that tb->tm_mday is 0.
Actually, most of the tb fields are 0 except tm_year (10445), tm_wday (1) and tm_yday (-1).
The code is the following:
( tb->tm_mday >= 1 ) &&
// Day is in valid range for the month
( ( _days[ tb->tm_mon + 1 ] - _days[ tb->tm_mon ] ) >=
tb->tm_mday ) ||
// Special case for Feb in a leap year
( IS_LEAP_YEAR( tb->tm_year + 1900 ) ) &&
( tb->tm_mon == 1 ) &&
( tb->tm_mday <= 29 )
So I would say the problem is really that the CRT should return EINVAL but instead triggers an assertion, perhaps because of a debug mode thing that we disable manually in 3.2?
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list