From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 9AF5E52CCD9; Thu, 13 Jul 2023 00:20:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9AF5E52CCD9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1689196809; bh=3zHMCKiZI+DrTQ93OoIgLeHiQBIpmyIi1b92pRH3s34=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=IqLfEw9SiwQHCaMAPNsQz9j9om1+icdVcH+ecMcfrhBBrz08m4NOxj4uKHMIptqY9 EamNdcawv/VddxxkrW3zdq3nqDukhb2m8PLoueXzR488+541N7tqpt5uVSjFd1eCTy W6AXDC+54j55Yb9z6tGlTvSqzG2/SPQCexxFlBaI= Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [95.163.41.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id EB3CB4F18B2 for ; Thu, 13 Jul 2023 00:19:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EB3CB4F18B2 Received: by smtp58.i.mail.ru with esmtpa (envelope-from ) id 1qJhFK-006ASt-1B; Thu, 13 Jul 2023 00:19:38 +0300 To: Sergey Kaplun , Sergey Bronnikov Date: Wed, 12 Jul 2023 21:09:34 +0000 Message-Id: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9B2A9E02D3479B2E06768B938AD40B0B2F406FBBAB3BE9D72182A05F53808504043621BE363C95B4A3C29353C3DFEDC63C43D70CB55D8E38ED5BE668283D2697D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70CB15FA6C489297DEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378997215BCAA11D778638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D872A926074A018C0F14CB82B45E311AEF117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC292D688DDAD4E7BC389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8D7F4798FD4FA8F52F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947C6A1CB4668A9CA5FA2D242C3BD2E3F4C64AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C39F168CC56BDDDDE2BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE7D151390FFDBF6399731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A58D6DCAD3758A4DD02269A10514B2A58DE882F8738B50D074F87CCE6106E1FC07E67D4AC08A07B9B0CE135D2742255B359C5DF10A05D560A950611B66E3DA6D700B0A020F03D25A0997E3FB2386030E77 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFF4A8977A7998D10F2719A7A92D05075EEE85F0C8A9A1EDD8C7786E82D9F1626745F8ED8E1771A93D399DF444199BC1D13750D0DBC9D5BF0BA12432CCAC64C06BA74DFFEFA5DC0E7F02C26D483E81D6BEECAEF3E2CCC1ED8C383653B6C8D9AE0FD16FCAA6493B703A X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj8UPT3baccqRqSPeIMUD1ig== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D531571A2A3983CD6C5C8B0EB72E275595583C486436259F529C2326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit 1/2] build: introduce LUAJIT_USE_ASAN option X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" There was nether a special option nor a variable to configure the sanitizers support via the build system since the commit 052c1a32a5e74b337686eee229d089d576775931 ("Add preliminary ASAN support") where ASan support had been introduced. We finally decided to use this feature in LuaJIT CI, so for convenient build configuration LUAJIT_USE_ASAN option is added to the root CMakeLists.txt. Resolves tarantool/tarantool#5878 Co-authored-by: Sergey Kaplun Signed-off-by: Igor Munkin --- CMakeLists.txt | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ef24bba..f113a53d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -269,15 +269,13 @@ if(LUA_USE_ASSERT) AppendFlags(TARGET_C_FLAGS -DLUA_USE_ASSERT) endif() -# TODO: Implement a configuration option to enable ASAN. -# There are two entries of LUAJIT_USE_ASAN define: -# $ grep -rnF 'LUAJIT_USE_ASAN' . -# ./src/lj_str.c:15:#if LUAJIT_USE_ASAN -# ./src/host/buildvm.c:36:#if LUAJIT_USE_ASAN -# At the same time this flag is not provided by LuaJIT original -# build system (i.e. src/Makefile.original) so there are no -# related compiler and linker flags passed. This should be done -# the right way later. +# Turn on AddressSanitizer support. As a result, all artefacts +# (i.e. buildvm, LuaJIT, testing infrastructure) are built with +# ASan enabled. +option(LUAJIT_USE_ASAN "Build LuaJIT with AddressSanitizer" OFF) +if(LUAJIT_USE_ASAN) + AppendFlags(CMAKE_C_FLAGS -DLUAJIT_USE_ASAN -fsanitize=address) +endif() # --- Main source tree --------------------------------------------------------- -- 2.30.2