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 Dennis Sweeney
Recipients Dennis Sweeney, tekknolagi
Date 2022-01-28.07:25:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643354757.3.0.177669992151.issue46561@roundup.psfhosted.org>
In-reply-to
Content
Why? Callee-borrowing-from-caller is the established norm across the C API. You mention use-after-free, but can you elaborate on how that can happen in practice?

https://docs.python.org/3/extending/extending.html?highlight=borrowed#ownership-rules says:

"""When you pass an object reference into another function, in general, the function borrows the reference from you — if it needs to store it, it will use Py_INCREF() to become an independent owner."""
History
Date User Action Args
2022-01-28 07:25:57Dennis Sweeneysetrecipients: + Dennis Sweeney, tekknolagi
2022-01-28 07:25:57Dennis Sweeneysetmessageid: <1643354757.3.0.177669992151.issue46561@roundup.psfhosted.org>
2022-01-28 07:25:57Dennis Sweeneylinkissue46561 messages
2022-01-28 07:25:57Dennis Sweeneycreate