Florian Weimer wrote: > Regarding commit 1d5c2ce4e295562daddfe6ce8e470749f0d42542, another > source of callbacks into compiled are error callbacks (which are > invoked only rarely). Perhaps it might make sense to mention this > case as well? I'll add that to the docs for 2.0.1. > Do you plan to fix this eventually? It's a bit scary. Any fix seems > to require to save the stack pointer and possibly a pointer to the > side exit in the Lua state on every C call, which introduces > additional overhead. 8-( You'll need the non-volatile register contents, too. And these are hard to retrieve. The x64 unwinder doesn't like the frame for the JIT-compiled code. And on non-x64 platforms there's no unwind information. I don't think there's a good solution to this problem. "Avoid callbacks from C" is the well-worn advice I can offer. --Mike