Message411979
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.""" |
|
Date |
User |
Action |
Args |
2022-01-28 07:25:57 | Dennis Sweeney | set | recipients:
+ Dennis Sweeney, tekknolagi |
2022-01-28 07:25:57 | Dennis Sweeney | set | messageid: <1643354757.3.0.177669992151.issue46561@roundup.psfhosted.org> |
2022-01-28 07:25:57 | Dennis Sweeney | link | issue46561 messages |
2022-01-28 07:25:57 | Dennis Sweeney | create | |
|