This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients jkloth, vstinner
Date 2022-02-26.01:50:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645840252.45.0.915416762124.issue46857@roundup.psfhosted.org>
In-reply-to
Content
> Good news, the difference on Windows was easy enough to find, bad news total refs are now negative!

Oh wow. How did you find this leak? Did you read all C files and check for code specific to Windows? How did you proceed? Well spotted!


>  #define INIT_ALIAS(NAME, TYPE)

I proposed GH-31594 to fix this macro.


> Strange as well, when using dump_refs, the total refs are much more negative (-12 linux, -13 Windows)

Which command do you type? Do you pass -I option to Python?

With my PR, I get exactly 0 on Linux:

$ ./python -I -X showrefcount -c pass
[0 refs, 0 blocks]


> Note that an allocated block is still leaking.

Right, with my PR, I now get 1 leaked memory block on Windows:

> python -I -X showrefcount -c pass               
[0 refs, 1 blocks]
History
Date User Action Args
2022-02-26 01:50:52vstinnersetrecipients: + vstinner, jkloth
2022-02-26 01:50:52vstinnersetmessageid: <1645840252.45.0.915416762124.issue46857@roundup.psfhosted.org>
2022-02-26 01:50:52vstinnerlinkissue46857 messages
2022-02-26 01:50:52vstinnercreate