BUG/MINOR: lua: Don't yield in channel.append() and channel.set()
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 6 Aug 2021 07:59:49 +0000 (09:59 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 12 Aug 2021 06:57:07 +0000 (08:57 +0200)
commit23976d9e40c53f06e26ecc70fcacbcf48ad1a723
treecd813fb86625dc1973ab161e505eee9fee7d51d9
parent2e60aa4dee4a07a8688ba456aa7036b85340cfdd
BUG/MINOR: lua: Don't yield in channel.append() and channel.set()

Lua functions to set or append data to the input part of a channel must not
yield because new data may be received while the lua script is suspended. So
adding data to the input part in several passes is highly unpredicatble and
may be interleaved with received data.

Note that if necessary, it is still possible to suspend a lua action by
returning act.YIELD. This way the whole action will be reexecuted later
because of I/O events or a timer. Another solution is to call core.yield().

This bug affects all stable versions. So, it may be backported. But it is
probably not necessary because nobody notice it till now.
src/hlua.c