Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Igor Munkin <imun@tarantool.org>, Sergey Kaplun <skaplun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit v2 4/5] build: introduce LUAJIT_USE_ASAN option
Date: Tue, 25 Jul 2023 15:26:04 +0300	[thread overview]
Message-ID: <87f18ea0-679c-3973-acf8-5a3be8b0b035@tarantool.org> (raw)
In-Reply-To: <ff943b5ab534e534911262ea8e5a8fde55061ef0.1689925402.git.imun@tarantool.org>

Hello, again


On 7/21/23 11:12, Igor Munkin wrote:


<snipped>

> +option(LUAJIT_USE_ASAN "Build LuaJIT with AddressSanitizer" OFF)
> +if(LUAJIT_USE_ASAN)
> +  if(NOT LUAJIT_USE_SYSMALLOC)
> +    message(WARNING
> +      "Unfortunately, internal LuaJIT memory allocator is not instrumented yet,"
> +      " so to find any memory errors it's better to build LuaJIT with system"
> +      " provided memory allocator (i.e. run CMake configuration phase with"
> +      " -DLUAJIT_USE_SYSMALLOC=ON)."
> +    )
> +  endif()
> +  # Use all recomendations described in AddressSanitize docs:
> +  # https://clang.llvm.org/docs/AddressSanitizer.html.
> +  AppendFlags(CMAKE_C_FLAGS
> +    # Enable hints for AddressSanitizer (see src/lj_str.c).
> +    -DLUAJIT_USE_ASAN
> +    # XXX: To get nicer stack traces in error messages.
> +    -fno-omit-frame-pointer
> +    # Enable AddressSanitizer support.
> +    -fsanitize=address
> +  )
> +endif()
>   

I suspect we need set in LUAJIT_USE_SYSMALLOC in cmake/luajit.cmake [1] 
on next LuaJIT bump, right?

Otherwise Tarantool CI will fail.


1. 
https://github.com/tarantool/tarantool/blob/1cda22aaaf7eb1f0880f4c70f2c79ce27a9604ce/cmake/luajit.cmake#L74-L76


>   # --- Main source tree ---------------------------------------------------------
>   

  parent reply	other threads:[~2023-07-25 12:26 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21  8:12 [Tarantool-patches] [PATCH luajit v2 0/5] Add ASan support in LuaJIT Igor Munkin via Tarantool-patches
2023-07-21  8:12 ` [Tarantool-patches] [PATCH luajit v2 1/5] ci: clean up workflow for exotic builds Igor Munkin via Tarantool-patches
2023-07-24 10:36   ` Sergey Bronnikov via Tarantool-patches
2023-07-26  9:37   ` Sergey Kaplun via Tarantool-patches
2023-07-21  8:12 ` [Tarantool-patches] [PATCH luajit v2 2/5] memprof: remove invalid assertions Igor Munkin via Tarantool-patches
2023-07-24 10:46   ` Sergey Bronnikov via Tarantool-patches
2023-07-26  9:41   ` Sergey Kaplun via Tarantool-patches
2023-07-21  8:12 ` [Tarantool-patches] [PATCH luajit v2 3/5] test: introduce test:done TAP helper Igor Munkin via Tarantool-patches
2023-07-24 10:53   ` Sergey Bronnikov via Tarantool-patches
2023-07-26 10:43   ` Sergey Kaplun via Tarantool-patches
2023-07-26 12:42     ` Igor Munkin via Tarantool-patches
2023-07-21  8:12 ` [Tarantool-patches] [PATCH luajit v2 4/5] build: introduce LUAJIT_USE_ASAN option Igor Munkin via Tarantool-patches
2023-07-24 11:41   ` Sergey Bronnikov via Tarantool-patches
2023-07-26 13:06     ` Igor Munkin via Tarantool-patches
2023-07-25 12:26   ` Sergey Bronnikov via Tarantool-patches [this message]
2023-07-26 12:54     ` Igor Munkin via Tarantool-patches
2023-07-27 11:06       ` Sergey Bronnikov via Tarantool-patches
2023-07-26 11:03   ` Sergey Kaplun via Tarantool-patches
2023-07-21  8:12 ` [Tarantool-patches] [PATCH luajit v2 5/5] ci: introduce testing workflow with sanitizers Igor Munkin via Tarantool-patches
2023-07-24 11:54   ` Sergey Bronnikov via Tarantool-patches
2023-07-26 14:53     ` Igor Munkin via Tarantool-patches
2023-07-27 11:13       ` Sergey Bronnikov via Tarantool-patches
2023-07-26 11:29   ` Sergey Kaplun via Tarantool-patches
2023-07-26 16:35     ` Igor Munkin via Tarantool-patches
2023-08-03  7:31 ` [Tarantool-patches] [PATCH luajit v2 0/5] Add ASan support in LuaJIT Igor Munkin via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87f18ea0-679c-3973-acf8-5a3be8b0b035@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=sergeyb@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit v2 4/5] build: introduce LUAJIT_USE_ASAN option' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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