Build Fails for LuaJIT with address sanitizer
kroggen opened this issue · 4 comments
Building LuaJIT with address sanitizer is not working, because the LuaJIT build process compiles and uses the buildvm
tool, and when it is run it throws many memory leaks
Steps to reproduce:
CC=clang CXX=clang++ cmake -S . -B build -DUSE_LUAJIT=ON -DENABLE_ASAN=ON -DENABLE_UBSAN=ON
cmake --build build
By the way, thank you for all the work put on this project!
Really well done!
One solution is to build LuaJIT twice:
- run plain build to compile
buildvm
without any sanitizer - remove build files only on the
src
folder (rm *.o *.a
) to keep thebuildvm
- build again, now with sanitizers
Building LuaJIT with address sanitizer is not working.
It is really so, but neither oss-fuzz nor oss-sydr-fuzz doesn't use fuzzing of LuaJIT with ASAN.
However, thanks for your suggestion, I'll try to make a patch for that.
The title of the issue reports a problem on building with ASAN, but the description contains a command-line with both ENABLE_ASAN=ON
and ENABLE_UBSAN
. This ticket is about fixing ASAN, not UBSAN.