Closed marcfir closed 6 months ago
I did a short test but could not reproduce a segfault here. Does this still occur after you fixed your timeout problems?
As long as the execution of the function is ongoing it should be fine. Only if there's a timeout the function will exit and anon_cb will become invalid. If the frame returned/is beeing processed afterwards it will/may crash. So i agree this might be a problem here, so i think this can be merged.
Hi Robert, I was finally able to test it. The segmentation error does not go away after fixing the timing problem. I could not find the difference between the Rust FFI link and the C link, but the PR fixes the problem.
Linking against a shared library produced segfaults because the function pointer was not in a valid address space. Making the function explicit fixed the problem.