Message125198
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:
_VALIDATE_RETURN_ERRCODE(
(
( 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 )
)
)
),
EINVAL
)
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? |
|
Date |
User |
Action |
Args |
2011-01-03 17:09:54 | pitrou | set | recipients:
+ pitrou, loewis, georg.brandl, db3l, amaury.forgeotdarc, belopolsky, vstinner, benjamin.peterson, Trundle, brian.curtin |
2011-01-03 17:09:54 | pitrou | set | messageid: <1294074594.69.0.219357913287.issue10814@psf.upfronthosting.co.za> |
2011-01-03 17:09:36 | pitrou | link | issue10814 messages |
2011-01-03 17:09:36 | pitrou | create | |
|