Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patches: support instrumenting dlmalloc by ASAN #101

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cmake/BuildLuaJIT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ macro(build_luajit LJ_VERSION)
set(CFLAGS "${CFLAGS} -fsanitize=fuzzer-no-link")
set(LDFLAGS "-fsanitize=fuzzer-no-link")

set(LUAJIT_PATCH_PATH ${PROJECT_SOURCE_DIR}/patches/luajit-v2.1.patch)
set(LUAJIT_BASEDIR ${PROJECT_SOURCE_DIR}/patches/)

if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CFLAGS "${CFLAGS} ${CMAKE_C_FLAGS_DEBUG}")
Expand Down Expand Up @@ -99,7 +99,9 @@ macro(build_luajit LJ_VERSION)
TMP_DIR ${LJ_BINARY_DIR}/tmp
STAMP_DIR ${LJ_BINARY_DIR}/stamp

PATCH_COMMAND git reset --hard && cd <SOURCE_DIR> && patch -p1 -i ${LUAJIT_PATCH_PATH}
PATCH_COMMAND git reset --hard && cd <SOURCE_DIR> &&
patch -p1 -i ${LUAJIT_BASEDIR}/luajit-v2.1.patch &&
patch -p1 -i ${LUAJIT_BASEDIR}/luajit-dmalloc-asan_instr-v2.1.patch
CONFIGURE_COMMAND ""
BUILD_COMMAND cd <SOURCE_DIR> && make -j CC=${CMAKE_C_COMPILER}
CFLAGS=${CFLAGS}
Expand Down
Loading
Loading