From c23c438dad058fc0f8f2e5956f37aeb591e2e4f8 Mon Sep 17 00:00:00 2001 From: Sergey Bronnikov Date: Tue, 8 Jul 2025 09:57:28 +0300 Subject: [PATCH] tests/capi: fix building luaL_bufflen_test In the latest commits LUAI_MAXSTACK is defined privately [1]: > LUAI_MAXSTACK is limited to INT_MAX/2, so can use INT_MAX/2 to > define pseudo-indices (LUA_REGISTRYINDEX) in 'lua.h'. A change > in the maximum stack size does not need to change the Lua-C ABI. 1. https://github.com/lua/lua/commit/59a1adf194efe43741c2bb2005d93d8320a19d14 --- tests/capi/luaL_bufflen_test.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/capi/luaL_bufflen_test.c b/tests/capi/luaL_bufflen_test.c index c9dc6433..26fbfc06 100644 --- a/tests/capi/luaL_bufflen_test.c +++ b/tests/capi/luaL_bufflen_test.c @@ -20,9 +20,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) if (L == NULL) return 0; - if (size > LUAI_MAXSTACK) - return -1; - luaL_Buffer buf; char *s = luaL_buffinitsize(L, &buf, size); memcpy(s, data, size);