Martin Panter added the comment: I don’t see any bug with countformat(), but if you can explain in more detail that would be good.
Myron, you are right that the build-value function has to fail to trigger this leak. But from my reading of the code, I think it would probably only happen for an out-of-memory error (e.g. allocating the tuple return value). Both call_method() and call_maybe() are static, and all the call sites look like they give valid format strings that would not fail except for the out-of-memory condition. Emanuel: if this can only produced by an out-of-memory error, it would be hard to demonstrate the leak. (Maybe use Victor Stinner’s malloc failure tool? I never tried it.) But IMO the code is incorrect as it is. If it is going to be handling an error, it should be cleaning up properly. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25716> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com