bpo-31217: Fix regrtest -R for small integer by vstinner · Pull Request #3258 · python/cpython
Conversation
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.
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)) |
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.
Abandonned in favor of the PR #3260.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters