Skip to content

Add fuzzer for datetime module#34

Draft
AdamKorcz wants to merge 1 commit intopython:mainfrom
AdamKorcz:add-datetime-fuzzer
Draft

Add fuzzer for datetime module#34
AdamKorcz wants to merge 1 commit intopython:mainfrom
AdamKorcz:add-datetime-fuzzer

Conversation

@AdamKorcz
Copy link
Copy Markdown

@AdamKorcz AdamKorcz commented Apr 10, 2026

Adds a structured fuzzer for the _datetime C module (Modules/_datetimemodule.c). It has two main branches: parsing and formatting. The parsing branch feeds fuzzed Unicode strings into date.fromisoformat(), time.fromisoformat(), and datetime.fromisoformat() to stress the C-level ISO 8601 parser. The formatting branch constructs valid date, time, and datetime objects with fuzzed field values and then calls strftime() with fuzz-generated format strings, exercising the C formatter's handling of arbitrary directives and edge-case field combinations.

@AdamKorcz AdamKorcz requested a review from a team as a code owner April 10, 2026 19:54
@AdamKorcz AdamKorcz marked this pull request as draft April 10, 2026 21:27
@AdamKorcz AdamKorcz marked this pull request as draft April 10, 2026 21:27
@AdamKorcz AdamKorcz marked this pull request as draft April 10, 2026 21:27
@AdamKorcz AdamKorcz force-pushed the add-datetime-fuzzer branch from 361a5b8 to 9f80b17 Compare April 11, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant