Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Sep 1, 2017

Workaround a complex bug in regrtest when hunting reference leaks.
Add a maybe_small_long() function to try to get int singletons to
prevent false alarm on memory block leaks.

https://bugs.python.org/issue31217

Workaround a complex bug in regrtest when hunting reference leaks.
Add a maybe_small_long() function to try to get int singletons to
prevent false alarm on memory block leaks.
# bpo-31217: On CPython, x_sub() of longobject.c doesn't try to use int
# singletons. Try to get singletons to prevent false alarms on memory block
# leaks.
return int(str(x))
Copy link
Member

Choose a reason for hiding this comment

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

Rather than rely on small int singletons, I think an explicit pool would be less implementation-dependent.

@vstinner
Copy link
Member Author

vstinner commented Sep 1, 2017

Abandonned in favor of the PR #3260.

@vstinner vstinner closed this Sep 1, 2017
@vstinner vstinner deleted the refleak_smallint branch September 1, 2017 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants