aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-09-22 19:03:11 -0400
committerGitHub <[email protected]>2020-09-22 16:03:11 -0700
commit5f8a9e6a028e9528567682cb0a92addb23032787 (patch)
tree3fd312c9b592c702c2e231b1618f96b6d2cc15e1 /module
parent6bdb09510bd27038ee85c372035b27120a4f46c6 (diff)
FreeBSD: Reduce stack usage of Lua
Use the same reduced buffer size for lauxlib that is used on Linux. Fixes panic on HEAD in lua gsub test designed to exhaust stack space. With this we can remove the special case to reserve more stack space on FreeBSD. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Kyle Evans <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10959
Diffstat (limited to 'module')
-rw-r--r--module/lua/llimits.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/module/lua/llimits.h b/module/lua/llimits.h
index 25466f14e..177092fbc 100644
--- a/module/lua/llimits.h
+++ b/module/lua/llimits.h
@@ -126,16 +126,7 @@ typedef LUAI_UACNUMBER l_uacNumber;
* Minimum amount of available stack space (in bytes) to make a C call. With
* gsub() recursion, the stack space between each luaD_call() is 1256 bytes.
*/
-#if defined(__FreeBSD__)
-/*
- * FreeBSD needs a few extra bytes in unoptimized debug builds to avoid a
- * double-fault handling the error when the max call depth is exceeded just
- * before the C stack runs out. 64 bytes seems to do the trick.
- */
-#define LUAI_MINCSTACK 4160
-#else
#define LUAI_MINCSTACK 4096
-#endif
/*
** maximum number of upvalues in a closure (both C and Lua). (Value