emacs-ffi icon indicating copy to clipboard operation
emacs-ffi copied to clipboard

added a (crashing) test that calls an ffi-function from a callback

Open little-big-h opened this issue 7 years ago • 0 comments

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 :-).

little-big-h avatar Dec 22 '17 22:12 little-big-h