Skip to content

gh-153569: add tokenizer validation tools - #156484

Draft
pablogsal wants to merge 20 commits into
python:mainfrom
pablogsal:gh-153569-tokenizer-validation-tools-clean
Draft

gh-153569: add tokenizer validation tools#156484
pablogsal wants to merge 20 commits into
python:mainfrom
pablogsal:gh-153569-tokenizer-validation-tools-clean

Conversation

@pablogsal

@pablogsal pablogsal commented Aug 27, 2026

Copy link
Copy Markdown
Member

This adds a tokenizer fuzz target that drives the byte, Unicode, and FILE readers, including token text and location lookups. It comes with focused seeds and a tokenizer dictionary, plus a differential runner for parser ASTs, token streams, warnings, errors, and callbacks that return several lines at once. Exact locations are compared by default, with a semantic mode for separating location changes from behavior changes.

This is stacked on #156482 and adds the validation tooling for #153569.

}

static int
fuzz_tokenizer(const char *data, size_t size)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move it to python/library-fuzzers (yes, name is a little misleading). We aren't adding anything to _xxtestfuzz as we are planning to move it all to the repository.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pablogsal a little ping FYI, since I see you're working on this.

@pablogsal pablogsal reopened this Aug 27, 2026
@pablogsal

Copy link
Copy Markdown
Member Author

Do not review until #156482 lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants