classification
Title: Tkinter: memory leak in splitlines() and split()
Type: resource usage Stage: resolved
Components: Tkinter Versions: Python 3.7, Python 3.6, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: 31673 Superseder:
Assigned To: serhiy.storchaka Nosy List: serhiy.storchaka, vstinner
Priority: normal Keywords: patch

Created on 2017-10-03 12:04 by serhiy.storchaka, last changed 2017-10-04 19:02 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 3866 merged serhiy.storchaka, 2017-10-03 12:25
PR 3874 merged python-dev, 2017-10-03 19:40
PR 3876 merged serhiy.storchaka, 2017-10-03 21:41
Messages (7)
msg303599 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-10-03 12:04
There is a memory leak in Tkinter's methods splitlines() and split() when pass a string larger than 2 GiB (when encoded to UTF-8).
msg303602 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-10-03 12:18
Which function? Do you mean split() and splitlist() methods of tkapp? C functions _tkinter_tkapp_split() and _tkinter_tkapp_splitlist().

Do you know how to reproduce the memory leak?
msg303604 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-10-03 12:35
Just run the bigmem tests with ulimit (after fixing issue31673).

    (ulimit -v 4350000; ./python -m test -vuall -M4G test_tcl)
msg303611 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-10-03 12:55
Oh, Python splitlist() doesn't seem to be documented.

Tcl SplitList documentation: https://www.tcl.tk/man/tcl/TclLib/SplitList.htm
msg303643 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-10-03 19:39
New changeset 27c623c845dd6e4b8e1782666ca3a956636da266 by Serhiy Storchaka in branch 'master':
bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (#3866)
https://github.com/python/cpython/commit/27c623c845dd6e4b8e1782666ca3a956636da266
msg303648 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-10-03 20:50
New changeset a65b2420f681c45db43e94bfe3dc50ad1dfcd03d by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6':
[3.6] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (GH-3866) (#3874)
https://github.com/python/cpython/commit/a65b2420f681c45db43e94bfe3dc50ad1dfcd03d
msg303726 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-10-04 18:37
New changeset 328b5d0e64798cf17360c6b2a07c2b18f2798b88 by Serhiy Storchaka in branch '2.7':
[2.7] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (GH-3866) (#3876)
https://github.com/python/cpython/commit/328b5d0e64798cf17360c6b2a07c2b18f2798b88
History
Date User Action Args
2017-10-04 19:02:26serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-10-04 18:37:55serhiy.storchakasetmessages: + msg303726
2017-10-03 21:41:15serhiy.storchakasetpull_requests: + pull_request3855
2017-10-03 20:50:48serhiy.storchakasetmessages: + msg303648
2017-10-03 19:40:09python-devsetpull_requests: + pull_request3853
2017-10-03 19:39:58serhiy.storchakasetmessages: + msg303643
2017-10-03 12:55:38vstinnersetmessages: + msg303611
2017-10-03 12:35:15serhiy.storchakasetmessages: + msg303604
2017-10-03 12:25:13serhiy.storchakasetkeywords: + patch
pull_requests: + pull_request3846
2017-10-03 12:18:06vstinnersetnosy: + vstinner
messages: + msg303602
2017-10-03 12:09:17serhiy.storchakasetdependencies: + Fix the name of Tkinter's adderrorinfo method
2017-10-03 12:04:33serhiy.storchakasetassignee: serhiy.storchaka
2017-10-03 12:04:23serhiy.storchakacreate