From d0a9ade00ab795c6827cddb498dde73b819283a8 Mon Sep 17 00:00:00 2001 From: ame Date: Tue, 11 Feb 2025 02:36:44 -0600 Subject: fixes and asan slopgit add . --- makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'makefile') diff --git a/makefile b/makefile index 991b84f..8f5d9a5 100644 --- a/makefile +++ b/makefile @@ -24,7 +24,22 @@ all: $(TARGET) release: CFLAGS += -O3 release: all -debug: CFLAGS += -g +# ok so im pretty sure asan should be linked too, however dlclose needs to be masked anyways +# and since libasan needs to be the first thing to load, you'll have to add it anyways +# run with something like 'LD_PRELOAD="/usr/lib/gcc/x86_64-pc-linux-gnu/14/libasan.so ./fakedlclose.so" lua5.4 ...' +# fakedlclose.so should be something as simple as the following: +# +# " +# #include +# int dlclose(void *handle) {;} +# " +# +# code (& fix) courtesy of +# https://github.com/google/sanitizers/issues/89#issuecomment-406316683 +# +# this also requires lua to be built with asan + +debug: CFLAGS += -ggdb3 -static-libasan -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls debug: all reg: -- cgit v1.2.3