| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
Check that the items of a non-empty tuple are released when the reallocation in _PyTuple_Resize() fails.
_PyTuple_Resize() did not validate newsize for non-empty tuples. Raise SystemError for a negative size and MemoryError for a too-large size, like PyTuple_New() already does for the empty-tuple path.
It relied on a huge allocation request failing, which is not portable: TSan aborts on it and it succeeds on wasm32 (WASI).
|
Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
Sorry, something went wrong.
|
GH-159976 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
|
GH-159977 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
…GH-159804) (#159976) gh-159739: Fix crash in _PyTuple_Resize() with an invalid size (GH-159804) _PyTuple_Resize() did not validate newsize for non-empty tuples. Raise SystemError for a negative size and MemoryError for a too-large size, like PyTuple_New() already does for the empty-tuple path. (cherry picked from commit c360884) Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
…GH-159804) (#159977) gh-159739: Fix crash in _PyTuple_Resize() with an invalid size (GH-159804) _PyTuple_Resize() did not validate newsize for non-empty tuples. Raise SystemError for a negative size and MemoryError for a too-large size, like PyTuple_New() already does for the empty-tuple path. (cherry picked from commit c360884) Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Fix a crash in _PyTuple_Resize when resizing a non-empty tuple to a
negative or too large size. It now raises SystemError or
MemoryError respectively.