]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: debug/lua: Use internal hlua function to dump the lua traceback
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 24 Mar 2021 13:52:24 +0000 (14:52 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 24 Mar 2021 15:35:23 +0000 (16:35 +0100)
commitcc2c4f8f4c1d8613b481d1b346e083a9d2462811
tree9505980d5bdb2fcd00df6274f30afc5dc5937b11
parentd09cc519bd0c04a0d1ec5bf23ed053c1e596851a
BUG/MEDIUM: debug/lua: Use internal hlua function to dump the lua traceback

The commit reverts following commits:
  * 83926a04 BUG/MEDIUM: debug/lua: Don't dump the lua stack if not dumpable
  * a61789a1 MEDIUM: lua: Use a per-thread counter to track some non-reentrant parts of lua

Instead of relying on a Lua function to print the lua traceback into the
debugger, we are now using our own internal function (hlua_traceback()).
This one does not allocate memory and use a chunk instead. This avoids any
issue with a possible deadlock in the memory allocator because the thread
processing was interrupted during a memory allocation.

This patch relies on the commit "BUG/MEDIUM: debug/lua: Use internal hlua
function to dump the lua traceback". Both must be backported wherever the
patches above are backported, thus as far as 2.0
include/haproxy/hlua.h
src/debug.c
src/hlua.c