-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix addCallback binding #1322
Fix addCallback binding #1322
Conversation
Mmmh, I remember adding these |
I'm checking the tests to understand better what's going on. |
Here is the commit that added these |
d657eea
to
e6fe51b
Compare
I updated the PR. Now tests pass (at least locally), and I'm not getting the nanobind leak messages when using Triton with LIEF v0.14.1. It does not seem necessary to increase the refs in Let's wait until all tests run and see what happens. |
These changes brought back this SEGFAULT |
Erf, you're right and I don't know why we didn't have this unittest... @cnheitman can you backport the patch and try another fix for the memleak? |
I think it makes sense to me that we require the addition of a reference to any function object sent to Could the cause of the memory leak be that |
Hey! A bit late... I'll try to check this again (and how it interacts with #1035) later this week. |
Fix PR fixes a small memory leak in the
addCallback
function. This issue was spotted than to LIEF and their new nanobind implementation of its Python bindings (ref here).