Closed Snape3058 closed 1 year ago
Thanks for the report, much appreciated! I'll take a look in some while, right now away from proper machine to test.
Just for my curiosity, which analyser did you use? I'd like to integrate it in GitHub hooks or at least release process, if it's freely available.
It is an experimental analyzer developed on the top of Clang Static Analyzer. When the tool is publicly available, I will reply to this issue to tell you. Currently, I am busy writing the paper for this research.
Sounds good, thank you - and thanks for finding the bugs!
I've committed a fix for the first issue, which was very clear. For the second batch of issues, in the module initalisation, I'm not entirely sure what's the correct way of handling initialisation error - is deconstructing (via ref count decrease) the module the right thing? It seems so, but testing behaviour here is hard.
Returning a new reference here: https://github.com/iustin/pyxattr/blob/c3466e74a2d72ede0d121aabdf687fa8d348bfc6/xattr.c#L632 Variable
my_tuple
goes out of scope without decreasing the refcnt. https://github.com/iustin/pyxattr/blob/c3466e74a2d72ede0d121aabdf687fa8d348bfc6/xattr.c#L639 Internal Report ID: 19f80bReturning a new reference here: https://github.com/iustin/pyxattr/blob/c3466e74a2d72ede0d121aabdf687fa8d348bfc6/xattr.c#L1185 Error handling code after goto target does not decrease the refcnt. (also other
goto
s in this function) https://github.com/iustin/pyxattr/blob/c3466e74a2d72ede0d121aabdf687fa8d348bfc6/xattr.c#L1201 Internal Report ID: 1eed62