Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

./Modules/_datetimemodule.c:290: days_before_year: Assertion `year >= 1' failed. #117534

Closed
Labels
extension-modulesC modules in the Modules dirtype-crashA hard crash of the interpreter, possibly with a core dump
@Vlad4896

Description

@Vlad4896

Crash report

What happened?

Python terminates with core dumped on the following test:

importdatetimey=datetime.datetime.fromisoformat('0000W25')print(y)

The test result:

python: ./Modules/_datetimemodule.c:290: days_before_year: Assertion `year >= 1' failed.Aborted (core dumped)

The issue happened due to lack of checking for input parameters in iso_to_ymd().
The 'iso_year' input parameter should be checked to fix the issue.

CPython versions tested on:

3.11, 3.12, CPython main branch

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

Python 3.13.0a5+ (heads/main:dc54714044, Apr 4 2024, 12:28:42) [GCC 11.4.0]

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtype-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp