-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Callback functions (on_connect, on_message, etc.) are called from non-lua code; which I cannot see as documented to be longjmp safe.
Lua C api functions will longjmp out on failure to the last pcall.
To fix, your lua function invocations should use lua_pcall.
Additionally, other functions such as lua_pushstring can longjmp out on memory allocation failure.
Line 555 in aa2e0b7
| lua_pushstring(ctx->L, str); |
These should also be called from inside a pcall (push a pointer on the stack instead and then inside the pcall use lua_pushstring).
Metadata
Metadata
Assignees
Labels
No labels