]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
lua: Increase reserved stack space for FreeBSD in debug config
authorRyan Moeller <ryan@iXsystems.com>
Fri, 31 Jul 2020 16:17:37 +0000 (12:17 -0400)
committerGitHub <noreply@github.com>
Fri, 31 Jul 2020 16:17:37 +0000 (09:17 -0700)
commit25499e2139b248eef1b89148002ade27f0223ba9
tree06edbecf311d40a99d1850f0fec9ca053f325f98
parent24f98ed383c978fe4ec385a912573fb1d9f3260e
lua: Increase reserved stack space for FreeBSD in debug config

FreeBSD uses more stack space in debug configurations and can overflow
the stack while formatting the error message when the call depth limit
of 20 frames is reached.  This is readily reproduced by running the
gsub recursion test with increased kstack size.  I hit the panic with
16 pages per kstack, and noticed it go away when bumped to 17.

Reserve an additional 64 bytes on the stack when building for FreeBSD.
This is enough to avoid the panic with a deep stack while not wasting
too much space when the default stack size is used.

Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10634
module/lua/llimits.h