Skip to content

Commit

Permalink
Merge PR #1524 (Release 2024-06: Faye) into master
Browse files Browse the repository at this point in the history
Collected changes for June 2024 release “Faye”
  • Loading branch information
eugeneia committed Jun 25, 2024
2 parents b7f6934 + 5f8a376 commit 4fb1217
Show file tree
Hide file tree
Showing 16 changed files with 1,926 additions and 352 deletions.
11 changes: 10 additions & 1 deletion lib/luajit/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ XCFLAGS=
# with "make clean", followed by "make".
# Note that most of these are NOT suitable for benchmarking or release mode!
#
# Use the system provided memory allocator (realloc) instead of the
# bundled memory allocator. This is slower, but sometimes helpful for
# debugging. This option cannot be enabled on x64 without GC64, since
# realloc usually doesn't return addresses in the right address range.
# OTOH this option is mandatory for Valgrind's memcheck tool on x64 and
# the only way to get useful results from it for all other architectures.
#XCFLAGS+= -DLUAJIT_USE_SYSMALLOC
#
# This define is required to run LuaJIT under Valgrind. The Valgrind
# header files must be installed. You should enable debug information, too.
# Use --suppressions=lj.supp to avoid some false positives.
Expand Down Expand Up @@ -228,7 +236,8 @@ LJCORE_O= lj_assert.o lj_gc.o lj_err.o lj_char.o lj_bc.o lj_obj.o lj_buf.o \
lj_asm.o lj_trace.o lj_gdbjit.o lj_auditlog.o \
lj_ctype.o lj_cdata.o lj_cconv.o lj_ccall.o lj_ccallback.o \
lj_carith.o lj_clib.o lj_cparse.o \
lj_lib.o lib_aux.o lj_dwarf_dwo.o \
lj_lib.o lj_alloc.o lib_aux.o \
lj_dwarf_dwo.o \
$(LJLIB_O) lib_init.o

DWARF_DWO= lj_dwarf.dwo
Expand Down
7 changes: 5 additions & 2 deletions lib/luajit/src/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ lib_string.o: lib_string.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \
lib_table.o: lib_table.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \
lj_def.h lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_buf.h lj_str.h \
lj_tab.h lj_ff.h lj_ffdef.h lj_lib.h lj_libdef.h
lj_alloc.o: lj_alloc.c lj_def.h lua.h luaconf.h lj_arch.h lj_alloc.h \
lj_prng.h
lj_api.o: lj_api.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \
lj_err.h lj_errmsg.h lj_debug.h lj_str.h lj_tab.h lj_func.h lj_udata.h \
lj_meta.h lj_state.h lj_bc.h lj_frame.h lj_trace.h lj_jit.h lj_ir.h \
Expand Down Expand Up @@ -199,9 +201,10 @@ lj_snap.o: lj_snap.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \
lj_state.o: lj_state.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \
lj_gc.h lj_err.h lj_errmsg.h lj_buf.h lj_str.h lj_tab.h lj_func.h \
lj_meta.h lj_state.h lj_frame.h lj_bc.h lj_ctype.h lj_trace.h lj_jit.h \
lj_ir.h lj_dispatch.h lj_traceerr.h lj_vm.h lj_prng.h lj_lex.h luajit.h
lj_ir.h lj_dispatch.h lj_traceerr.h lj_vm.h lj_prng.h lj_lex.h \
lj_alloc.h luajit.h
lj_str.o: lj_str.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \
lj_err.h lj_errmsg.h lj_str.h lj_char.h lj_prng.h
lj_err.h lj_errmsg.h lj_str.h lj_char.h
lj_strfmt.o: lj_strfmt.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \
lj_err.h lj_errmsg.h lj_buf.h lj_gc.h lj_str.h lj_meta.h lj_state.h \
lj_char.h lj_strfmt.h lj_ctype.h lj_lib.h
Expand Down
18 changes: 18 additions & 0 deletions lib/luajit/src/lib_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ static int panic(lua_State *L)
return 0;
}

#ifdef LUAJIT_USE_SYSMALLOC


static void *mem_alloc(void *ud, void *ptr, size_t osize, size_t nsize)
{
(void)ud;
Expand All @@ -328,3 +331,18 @@ LUALIB_API lua_State *luaL_newstate(void)
}
return L;
}

#else

LUALIB_API lua_State *luaL_newstate(void)
{
lua_State *L;
L = lua_newstate(LJ_ALLOCF_INTERNAL, NULL);
if (L) {
G(L)->panic = panic;
}
return L;
}

#endif

Loading

0 comments on commit 4fb1217

Please sign in to comment.