Tried on current main branch.
./python -m test -R 3:3 test_mmap Running Debug|x64 interpreter... 0:00:00 Run tests sequentially 0:00:00 [1/1] test_mmap beginning 6 repetitions 123456 ...... test_mmap leaked [13, 13, 13] references, sum=39 test_mmap failed (reference leak) == Tests result: FAILURE == 1 test failed: test_mmap Total duration: 1.3 sec Tests result: FAILURE
OS: Windows 10 & WSL Ubuntu 20.04
PR which introduce it: #103990
Cc. @Agent-Hellboy / @JelleZijlstra / @sunmy2019
It seems like Py_buffer in mmap_gfind, mmap_write_method and mmap_ass_subscript should be released if CHECK_VALID fails.
Py_buffer
mmap_gfind
mmap_write_method
mmap_ass_subscript
CHECK_VALID
Yeah, you're right. I'll soon send a PR.
Yeah, I forgot about it.
I'll soon send a PR.
Thanks!
pythongh-104698: Fix reference leak in mmapmodule.c
Sorry for this, should have run the refleak buildbots before merging. Thanks @chgnrdv for the diagnosis and @Eclips4 for the PR.
gh-104698: Fix reference leak in mmapmodule.c (#104700)
pythongh-104698: Fix reference leak in mmapmodule.c (pythonGH-104700)
[3.11] gh-104698: Fix reference leak in mmapmodule.c (GH-104700) (#10…
Sorry for this, should have run the refleak buildbots before merging.
Can we make it mandatory?
Sorry for this, should have run the refleak buildbots before merging. Can we make it mandatory?
I think, it's a good idea. Also, running refleak buildbots make sense in PR's which changes/adding C code. So, there need a check.
Activity
Eclips4 commentedon May 20, 2023
PR which introduce it: #103990
AlexWaygood commentedon May 20, 2023
Cc. @Agent-Hellboy / @JelleZijlstra / @sunmy2019
chgnrdv commentedon May 20, 2023
It seems like
Py_bufferinmmap_gfind,mmap_write_methodandmmap_ass_subscriptshould be released ifCHECK_VALIDfails.Eclips4 commentedon May 20, 2023
Yeah, you're right. I'll soon send a PR.
sunmy2019 commentedon May 20, 2023
Yeah, I forgot about it.
Thanks!
pythongh-104698: Fix reference leak in mmapmodule.c
JelleZijlstra commentedon May 20, 2023
Sorry for this, should have run the refleak buildbots before merging. Thanks @chgnrdv for the diagnosis and @Eclips4 for the PR.
gh-104698: Fix reference leak in mmapmodule.c (#104700)
pythongh-104698: Fix reference leak in mmapmodule.c (pythonGH-104700)
[3.11] gh-104698: Fix reference leak in mmapmodule.c (GH-104700) (#10…
sunmy2019 commentedon May 21, 2023
Can we make it mandatory?
Eclips4 commentedon May 21, 2023
I think, it's a good idea. Also, running refleak buildbots make sense in PR's which changes/adding C code. So, there need a check.