mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 00:08:30 +00:00
Increase stack size to 128k and guard size to 16k
This improves our compatibility with Apple M1.
This commit is contained in:
parent
57c0dcdc29
commit
dd04aeba1c
36 changed files with 109 additions and 125 deletions
4
third_party/lua/lua.mk
vendored
4
third_party/lua/lua.mk
vendored
|
@ -155,10 +155,6 @@ o/$(MODE)/third_party/lua/lvm.o: private \
|
|||
OVERRIDE_CFLAGS += \
|
||||
-fno-gcse
|
||||
|
||||
o/$(MODE)/third_party/lua/lauxlib.o: private \
|
||||
OVERRIDE_CFLAGS += \
|
||||
-DSTACK_FRAME_UNLIMITED
|
||||
|
||||
$(THIRD_PARTY_LUA_A_OBJS): private \
|
||||
OVERRIDE_CFLAGS += \
|
||||
-ffunction-sections \
|
||||
|
|
4
third_party/lua/luaencodejsondata.c
vendored
4
third_party/lua/luaencodejsondata.c
vendored
|
@ -22,8 +22,8 @@
|
|||
#include "libc/intrin/likely.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/log/rop.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/mem/gc.internal.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/stack.h"
|
||||
#include "libc/stdio/append.h"
|
||||
#include "libc/stdio/strlist.internal.h"
|
||||
|
@ -169,7 +169,7 @@ static int SerializeTable(lua_State *L, char **buf, int idx,
|
|||
bool multi;
|
||||
bool isarray;
|
||||
lua_Unsigned n;
|
||||
if (UNLIKELY(!HaveStackMemory(PAGESIZE))) {
|
||||
if (UNLIKELY(!HaveStackMemory(GUARDSIZE))) {
|
||||
z->reason = "out of stack";
|
||||
return -1;
|
||||
}
|
||||
|
|
2
third_party/lua/luaencodeluadata.c
vendored
2
third_party/lua/luaencodeluadata.c
vendored
|
@ -353,7 +353,7 @@ static int SerializeTable(lua_State *L, char **buf, int idx,
|
|||
int rc;
|
||||
bool multi;
|
||||
intptr_t rsp, bot;
|
||||
if (UNLIKELY(!HaveStackMemory(PAGESIZE))) {
|
||||
if (UNLIKELY(!HaveStackMemory(GUARDSIZE))) {
|
||||
z->reason = "out of stack";
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue