STINNER Victor <vstin...@python.org> added the comment:

> 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]

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46857>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to