This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients Trundle, amaury.forgeotdarc, belopolsky, benjamin.peterson, brian.curtin, db3l, georg.brandl, loewis, pitrou, vstinner
Date 2011-01-03.17:09:36
SpamBayes Score 1.910613e-08
Marked as misclassified No
Message-id <1294074594.69.0.219357913287.issue10814@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2011-01-03 17:09:54pitrousetrecipients: + pitrou, loewis, georg.brandl, db3l, amaury.forgeotdarc, belopolsky, vstinner, benjamin.peterson, Trundle, brian.curtin
2011-01-03 17:09:54pitrousetmessageid: <1294074594.69.0.219357913287.issue10814@psf.upfronthosting.co.za>
2011-01-03 17:09:36pitroulinkissue10814 messages
2011-01-03 17:09:36pitroucreate