GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — gh-154387: validate `PyStructSequence_Desc` field invariants by XuehaiPan · Pull Request #154684 · python/cpython Conversation
|
Documentation build overview
434 files changed ·
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ifiers count_members() now rejects a PyStructSequence_Desc whose n_in_sequence is negative, completing the bounds check (only n_in_sequence <= n_fields was enforced before). A negative value otherwise inflated tp_basicsize and failed later with a cryptic SystemError from PyTuple_New(). Also fix the two existing error messages: n_in_sequence is an int but was printed with %zd (Py_ssize_t), which is undefined behavior in a variadic call. Add a _testcapi helper and regression test for the negative case, and document the non-negative constraint.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.