Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH luajit 0/1] ASAN & LuaJIT allocator
@ 2024-08-22 18:15 mandesero--- via Tarantool-patches
  2024-08-22 18:15 ` [Tarantool-patches] [PATCH luajit 1/1] asan: instrumented LuaJIT memory allocator mandesero--- via Tarantool-patches
  0 siblings, 1 reply; 2+ messages in thread
From: mandesero--- via Tarantool-patches @ 2024-08-22 18:15 UTC (permalink / raw)
  To: tarantool-patches, skaplun, m.kokryashkin; +Cc: Maksim Tiushev

From: Maksim Tiushev <mandesero@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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-22 18:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-22 18:15 [Tarantool-patches] [PATCH luajit 0/1] ASAN & LuaJIT allocator mandesero--- via Tarantool-patches
2024-08-22 18:15 ` [Tarantool-patches] [PATCH luajit 1/1] asan: instrumented LuaJIT memory allocator mandesero--- via Tarantool-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox