gh-145376: Fix reference leak in _lprof.c#145539
Conversation
vstinner
left a comment
There was a problem hiding this comment.
LGTM.
The get_cfunc_from_callable() fix is surprising: PyCFunction_Check() is always true and so nobody noticed the reference leak before? Is it possible to trigger the leak with a reproducer?
I cannot create a reproducer from the Python side. The check A C-extension could override the I can leave this part as is, change the Pinging @gaogaotiantian as the one who introduced the code in #103534 |
|
Merged. Thanks for the fix. |
Skipping news. This only affects cases where people manually replace the
sys.monitoring.MISSINGsentinel.