Skip to content

Add fuzzer for locale module#47

Open
AdamKorcz wants to merge 1 commit intopython:mainfrom
AdamKorcz:add-locale-fuzzer
Open

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

Conversation

@AdamKorcz
Copy link
Copy Markdown
Contributor

@AdamKorcz AdamKorcz commented Apr 10, 2026

Fuzzes the CPython _locale C module (Modules/_localemodule.c) through its two Unicode-consuming entry points. Dispatches per input to either locale.strxfrm() — the locale-aware string-to-transform-key conversion that exercises the underlying wcsxfrm() wrapper and its wchar_t encode/decode boundaries — or locale.strcoll(), which compares two fuzzed Unicode strings via wcscoll() to drive the locale-aware collation path. Inputs are Unicode text drawn from the fuzzed byte stream, so multibyte, surrogate-range, and astral-plane code points all reach the C conversion layer.

@AdamKorcz AdamKorcz requested a review from a team as a code owner April 10, 2026 19:57
@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 marked this pull request as ready for review April 22, 2026 20:49
Fuzzes the CPython _locale C module (Modules/_localemodule.c) through
its two Unicode-consuming entry points. Dispatches per input to either
locale.strxfrm() — the locale-aware string-to-transform-key conversion
that exercises the underlying wcsxfrm() wrapper and its wchar_t
encode/decode boundaries — or locale.strcoll(), which compares two
fuzzed Unicode strings via wcscoll() to drive the locale-aware
collation path. Inputs are Unicode text drawn from the fuzzed byte
stream, so multibyte, surrogate-range, and astral-plane code points
all reach the C conversion layer.
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