[Tarantool-patches] [PATCH luajit 0/1] ASAN & LuaJIT allocator
mandesero at gmail.com
mandesero at gmail.com
Thu Aug 22 21:15:41 MSK 2024
From: Maksim Tiushev <mandesero at gmail.com>
This patch introduces ASAN instrumentation for the internal LuaJIT allocator.
Each CI job testing with ASAN now includes two scenarios: testing with the
internal LuaJIT allocator and testing with `sysmalloc`. Additionally, certain
tests can be disabled using the `LJ_ASAN_HARDENING` environment variable which
is useful in cases where a test fails due to time constraints.
The ASAN instrumentation of the internal LuaJIT allocator enhances the ability
to detect memory handling errors, particularly when utilizing FFI.
Branch: https://github.com/tarantool/luajit/tree/mandesero/lj-10231-ASAN-and-LJ-allocator
Issue: https://github.com/tarantool/tarantool/issues/10231
Testing the patch with Tarantool:
PR: https://github.com/tarantool/tarantool/pull/10232
Maksim Tiushev (1):
asan: instrumented LuaJIT memory allocator
.github/workflows/sanitizers-testing.yml | 20 +-
CMakeLists.txt | 29 +-
src/lj_alloc.c | 267 +++++++++++++++++-
.../asan-alloc-instrumentation.test.c | 141 +++++++++
.../asan-mmap-instrumentation.test.c | 128 +++++++++
.../ASAN-left-memory-miss.test.lua | 12 +
.../ASAN-left-memory-miss/script.lua | 19 ++
.../ASAN-right-memory-miss.test.lua | 12 +
.../ASAN-right-memory-miss/script.lua | 19 ++
.../ASAN-use-after-free.test.lua | 12 +
.../ASAN-use-after-free/script.lua | 24 ++
test/tarantool-tests/CMakeLists.txt | 2 +-
.../lj-1034-tabov-error-frame.test.lua | 2 +
13 files changed, 669 insertions(+), 18 deletions(-)
create mode 100644 test/tarantool-c-tests/asan-alloc-instrumentation.test.c
create mode 100644 test/tarantool-c-tests/asan-mmap-instrumentation.test.c
create mode 100644 test/tarantool-tests/ASAN-left-memory-miss.test.lua
create mode 100644 test/tarantool-tests/ASAN-left-memory-miss/script.lua
create mode 100644 test/tarantool-tests/ASAN-right-memory-miss.test.lua
create mode 100644 test/tarantool-tests/ASAN-right-memory-miss/script.lua
create mode 100644 test/tarantool-tests/ASAN-use-after-free.test.lua
create mode 100644 test/tarantool-tests/ASAN-use-after-free/script.lua
--
2.34.1
More information about the Tarantool-patches
mailing list