diff options
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -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 <stdio.h>
+# 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:
|
