[2.7] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (GH-3866) by serhiy-storchaka · Pull Request #3876 · python/cpython

@serhiy-storchaka

@serhiy-storchaka

…d split() (pythonGH-3866)

when pass a string larger than 2 GiB.

Decrease memory requirements for Tcl's bigmem tests..
(cherry picked from commit 27c623c)

vstinner

Choose a reason for hiding this comment

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

While the PR seems good to me, I'm not sure that a NEWS entry is really needed. _tkinter.c doesn't have "#define PY_SSIZE_T_CLEAN" in Python 2.7, and so already rejected strings longer than INT_MAX in PyArg_ParseTuple(), no?

@serhiy-storchaka

PY_SSIZE_T_CLEAN affects the type of the size variable. But "et" doesn't return a size.

vstinner

Choose a reason for hiding this comment

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

LGTM.

@vstinner

PY_SSIZE_T_CLEAN affects the type of the size variable. But "et" doesn't return a size.

Oh, I see. Thank you for checking. Your PR now LGTM.