mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-20 05:53:26 +00:00
fix crash
This commit is contained in:
parent
5b750a81c3
commit
12fb2eea33
@ -76,11 +76,13 @@ if (LUAJIT_ENABLE_FSANITIZE)
|
|||||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
message(STATUS "luajit debug mode")
|
message(STATUS "luajit debug mode")
|
||||||
add_definitions(-DLUA_USE_APICHECK -DLUA_USE_ASSERT -DLUAJIT_USE_SYSMALLOC)
|
add_definitions(-DLUA_USE_APICHECK -DLUA_USE_ASSERT -DLUAJIT_USE_SYSMALLOC)
|
||||||
if (MSVC)
|
if (NOT MSVC)
|
||||||
add_link_options(-fsanitize=address)
|
add_link_options(-fsanitize=address)
|
||||||
add_compile_options(-fsanitize=address)
|
add_compile_options(-fsanitize=address)
|
||||||
|
else()
|
||||||
|
add_link_options(/fsanitize=address)
|
||||||
|
add_compile_options(/fsanitize=address)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
CHECK_TYPE_SIZE("void*" SIZEOF_VOID_P)
|
CHECK_TYPE_SIZE("void*" SIZEOF_VOID_P)
|
||||||
|
@ -1761,6 +1761,8 @@ static void expr_table(LexState *ls, ExpDesc *e)
|
|||||||
lex_check(ls, '{');
|
lex_check(ls, '{');
|
||||||
#if LJ_DS_PARSER_TABLE_PATCH
|
#if LJ_DS_PARSER_TABLE_PATCH
|
||||||
GCtab* tmp_t = lj_tab_new(fs->L, 0, 0);
|
GCtab* tmp_t = lj_tab_new(fs->L, 0, 0);
|
||||||
|
settabV(fs->L, fs->L->top, tmp_t);
|
||||||
|
incr_top(fs->L);
|
||||||
int tmp_indx = 0;
|
int tmp_indx = 0;
|
||||||
#endif
|
#endif
|
||||||
while (ls->tok != '}') {
|
while (ls->tok != '}') {
|
||||||
@ -1871,6 +1873,7 @@ static void expr_table(LexState *ls, ExpDesc *e)
|
|||||||
}
|
}
|
||||||
lj_gc_check(fs->L);
|
lj_gc_check(fs->L);
|
||||||
}
|
}
|
||||||
|
fs->L->top--;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Parse function parameters. */
|
/* Parse function parameters. */
|
||||||
|
Loading…
Reference in New Issue
Block a user