lua-nginx-module icon indicating copy to clipboard operation
lua-nginx-module copied to clipboard

bugfix: lua panic handling in ngx.socket.tcp

Open pracj3am opened this issue 1 year ago • 0 comments

If luaL_pushresult() encounters a buffer larger than 2GB, it triggers a Lua panic. This panic is handled by ngx_http_lua_atpanic(), which performs a longjmp() back to the last setjmp() call point (e.g., ngx_http_lua_log_by_chunk()), potentially causing a SEGFAULT or ABORT signal if stack protection is enabled.

The fix sets the handler that manages Lua panics directly within ngx_http_lua_socket_push_input_data().

I hereby granted the copyright of the changes in this pull request to the authors of this lua-nginx-module project.

pracj3am avatar Nov 16 '24 09:11 pracj3am