Skip to content

Conversation

@pracj3am
Copy link
Contributor

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.

@pracj3ampracj3amforce-pushed the pracj3am/socket-tcp-panic branch 3 times, most recently from 94801d8 to 98dc89aCompareNovember 16, 2024 11:07
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().
@pracj3ampracj3amforce-pushed the pracj3am/socket-tcp-panic branch from 98dc89a to 4dd7974CompareApril 14, 2025 14:05
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@pracj3am