emacs-ffi
emacs-ffi copied to clipboard
added a (crashing) test that calls an ffi-function from a callback
I've run into this problem (when building a libclang-based emacs plugin): when calling a function from a callback, the (global) environment pointer is nulled out after the function call (but before finishing the callback). This causes an assertion to fail and crashes emacs.
I see that this is tricky to handle due to the poorly designed emacs runtime (see https://github.com/aaptel/emacs-dynamic-module/issues/41). I have some ideas how to fix/hack it (e.g., a map of function calls to environment objects) and would be willing to help. I felt that this starts with contributing a test case :-).