mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Fix C stack remaining check in MODE=tiny
This commit is contained in:
parent
bcdd5c5f74
commit
28b9d9f781
5 changed files with 11 additions and 7 deletions
3
third_party/lua/luaencodejsondata.c
vendored
3
third_party/lua/luaencodejsondata.c
vendored
|
@ -18,6 +18,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/bits/likely.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/log/log.h"
|
||||
|
@ -165,7 +166,7 @@ static int SerializeTable(lua_State *L, char **buf, int idx,
|
|||
int rc;
|
||||
bool isarray;
|
||||
lua_Unsigned n;
|
||||
if ((intptr_t)__builtin_frame_address(0) < GetStackAddr() + PAGESIZE * 2) {
|
||||
if (UNLIKELY(!HaveStackMemory(PAGESIZE))) {
|
||||
z->reason = "out of stack";
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue