Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

_tkinter: Fix refleak in getint()#2153

Merged
vstinner merged 1 commit into
python:2.7python/cpython:2.7from
vstinner:tcl_refleak27Copy head branch name to clipboard
Jun 13, 2017
Merged

_tkinter: Fix refleak in getint()#2153
vstinner merged 1 commit into
python:2.7python/cpython:2.7from
vstinner:tcl_refleak27Copy head branch name to clipboard

Conversation

@vstinner

Copy link
Copy Markdown
Member

PyNumber_Int() creates a new reference: need to decrement result
reference counter.

PyNumber_Int() creates a new reference: need to decrement result
reference counter.
@vstinner

Copy link
Copy Markdown
Member Author

Currently, test_tcl leaks on 2.7:

http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%202.7/builds/24/steps/test/logs/stdio

1:17:14 [208/403/2] test_tcl failed (32 sec) -- running: test_bsddb3 (1797 sec), test_weakref (4584 sec), test_regrtest (3553 sec)
beginning 6 repetitions
123456
......
test_tcl leaked [53, 53, 53] references, sum=159

With my change, it doesn't leak anymore:

haypo@selma$ ./python -m test -R 3:3 test_tcl
0:00:00 [1/1] test_tcl
beginning 6 repetitions
123456
......
1 test OK.

@vstinner vstinner merged commit bdd3567 into python:2.7 Jun 13, 2017
@vstinner vstinner deleted the tcl_refleak27 branch June 13, 2017 09:12
@serhiy-storchaka serhiy-storchaka added the type-bug An unexpected behavior, bug, or error label Jun 13, 2017
@serhiy-storchaka

Copy link
Copy Markdown
Member

Good catch!

@vstinner

Copy link
Copy Markdown
Member Author

Good catch!

Say thank you to @zware who installed a new "refleak" buildbot for Windows. I wouldn't run the full test suite with -R 3:3 on my own, it's too long (2 hours?). The bisection was trivial, the bug too.

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

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.