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 AC2E96E236; Fri, 31 Jul 2026 22:13:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org AC2E96E236 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1785525189; bh=TzFfHj4Hu0R4scclX1K5SxyKjlUcUWgaJkJntBdaLHc=; 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=eXXKCaU/zIeZoEaRoqtBAGiS2CrmNtGuJEKKdee4qwfFE/INOtpPXnlULJS6eEXM2 b2Jg1nh8V+2nIDXAlIAbknqQsDTqby98J+egqQWXfHJGGrawcXPlTHcaSWLnAfuUjH bHVGCYQpC0oGtxuxR1Phqb1voolgh77fbcqH3lH4= Received: from send218.i.mail.ru (send218.i.mail.ru [95.163.59.57]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id C41E46E236 for ; Fri, 31 Jul 2026 22:12:10 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C41E46E236 Received: by exim-smtp-7f4897b4d8-5vls4 with esmtpa (envelope-from ) id 1wpseP-000000009a7-1zZV; Fri, 31 Jul 2026 22:12:10 +0300 To: Sergey Kaplun , Sergey Bronnikov Date: Fri, 31 Jul 2026 22:12:01 +0300 Message-ID: <83481da1b7122a93f6705837ebd0d6a1174b0119.1785521480.git.e.temirgaleev@tarantool.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD9DFD0580A18F855909275BB0BC6A3C71430406AE4078A27D1182A05F5380850407C401CCFBA4846D83DE06ABAFEAF6705DE4AB2AC6463D8651581BDD28CC22B3BC1F8F9D846F8CF10 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE760302A529BCAAAFCEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F88016AB904663428638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2751571597CCE35F02E070BE324C7D3C442564A7D179F332FF6B57BC7E64490618DEB871D839B73339E8FC8737B5C224925DC386152A6764ACC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C06030C3405640F6718941B15DA834481F9449624AB7ADAF37BA3038C0950A5D3613377AFFFEAFD269176DF2183F8FC7C0298E1E51661CBDD77B076A6E789B0E97A8DF7F3B2552694AD5FFEEA1DED7F25D49FD398EE364050F1E561CDFBCA1751FBFC1D8BB4B114D1EB3661434B16C20ACC84D3B47A649675FE827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BEB1A37DF9DABAA8F75ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A51D6F9132D03B451E5002B1117B3ED69601EDF4DB7A577FB15B6221DB6D7A72AD823CB91A9FED034534781492E4B8EEADA7D01B58E6BF979CC79554A2A72441328621D336A7BC284946AD531847A6065A535571D14F44ED41 X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE191716CD42B3DD1D34CAB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D65915D1350CA341E3AFC4992248E0465E7FEDA169AE3A22F4720A8C503B59583B7B291EC03B5FF184EBB8341EE9D5BE9A0AD4CAEB73C9DC67DE6FD00E945C915C54A1A71EF730EDD0AFC7CEAA0681F5848F4C41F94D744909CEEF9E35A692215F79327F81E6EEE0AEB67A0F9F91F029B6AF33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVczkDsfooUjfGsjeigiKewc= X-Mailru-Sender: 67F79B6D769303DDF42BF8E8391677BCD8B7FB8883E20BCD3DE06ABAFEAF6705DE4AB2AC6463D8656FA35EADE8FD784D8916C52554E253A2C77752E0C033A69EE1EF5E1C5BB7B70978184EDC3E27953A3A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit v2 2/3] ci: enabled sanitizer tests for macOS 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: Evgeniy Temirgaleev via Tarantool-patches Reply-To: Evgeniy Temirgaleev Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Temir Galeev The arm64 and x86_64 architectures with clang compiler were added to the matrix. --- .../README.md | 0 .../action.yml | 0 .../actions/setup-sanitizers-macos/README.md | 12 ++++ .../actions/setup-sanitizers-macos/action.yml | 18 +++++ .github/workflows/sanitizers-testing.yml | 65 ++++++++++++++++--- 5 files changed, 86 insertions(+), 9 deletions(-) rename .github/actions/{setup-sanitizers => setup-sanitizers-linux}/README.md (100%) rename .github/actions/{setup-sanitizers => setup-sanitizers-linux}/action.yml (100%) create mode 100644 .github/actions/setup-sanitizers-macos/README.md create mode 100644 .github/actions/setup-sanitizers-macos/action.yml diff --git a/.github/actions/setup-sanitizers/README.md b/.github/actions/setup-sanitizers-linux/README.md similarity index 100% rename from .github/actions/setup-sanitizers/README.md rename to .github/actions/setup-sanitizers-linux/README.md diff --git a/.github/actions/setup-sanitizers/action.yml b/.github/actions/setup-sanitizers-linux/action.yml similarity index 100% rename from .github/actions/setup-sanitizers/action.yml rename to .github/actions/setup-sanitizers-linux/action.yml diff --git a/.github/actions/setup-sanitizers-macos/README.md b/.github/actions/setup-sanitizers-macos/README.md new file mode 100644 index 00000000..7061c042 --- /dev/null +++ b/.github/actions/setup-sanitizers-macos/README.md @@ -0,0 +1,12 @@ +# Setup environment for sanitizers on macOS + +Action setups the environment on macOS runners (install requirements, setup the +workflow environment, etc) for testing with sanitizers enabled. + +## How to use Github Action from Github workflow + +Add the following code to the running steps before LuaJIT configuration: +``` +- uses: ./.github/actions/setup-sanitizers-macos + if: ${{ matrix.OS == 'macOS' }} +``` diff --git a/.github/actions/setup-sanitizers-macos/action.yml b/.github/actions/setup-sanitizers-macos/action.yml new file mode 100644 index 00000000..441285f9 --- /dev/null +++ b/.github/actions/setup-sanitizers-macos/action.yml @@ -0,0 +1,18 @@ +name: Setup CI environment for testing with sanitizers on macOS +description: Common part to tweak macOS CI runner environment for sanitizers +inputs: + cc_name: + description: C compiler name (for example, gcc-12) + required: false + default: clang +runs: + using: composite + steps: + - name: Setup CI environment on macOS + uses: ./.github/actions/setup-macos + - name: Set specific C compiler as a default toolchain + run: | + echo CC=${CC_NAME} | tee -a $GITHUB_ENV + shell: bash + env: + CC_NAME: ${{ inputs.cc_name }} diff --git a/.github/workflows/sanitizers-testing.yml b/.github/workflows/sanitizers-testing.yml index 4bf7d023..aa9eae16 100644 --- a/.github/workflows/sanitizers-testing.yml +++ b/.github/workflows/sanitizers-testing.yml @@ -31,17 +31,33 @@ jobs: strategy: fail-fast: false matrix: - # XXX: Let's start with only Linux/x86_64 + ARCH: [ARM64, x86_64] BUILDTYPE: [Debug, Release] - CC: [gcc-10, clang-11] + OS: [Linux, macOS] + # Versioned compilers are for Linux. + CC: [gcc-10, clang-11, clang] include: - BUILDTYPE: Debug CMAKEFLAGS: -DCMAKE_BUILD_TYPE=Debug -DLUA_USE_ASSERT=ON -DLUA_USE_APICHECK=ON - BUILDTYPE: Release CMAKEFLAGS: -DCMAKE_BUILD_TYPE=RelWithDebInfo - runs-on: [self-hosted, regular, Linux, x86_64] + exclude: + - OS: macOS + CC: gcc-10 + - OS: macOS + CC: clang-11 + - OS: Linux + CC: clang + # On current runners with Linux/ARM64 environment and + # with LUAJIT_USE_SYSMALLOC=ON the system allocator returns addresses + # with 48-bit set. Thus checkptrGC() fails with new Lua state pointer + # and luajit fails to start with 'cannot create state: not enough memory' + # error. So, we exclude this case. + - ARCH: ARM64 + OS: Linux + runs-on: [self-hosted, regular, '${{ matrix.OS }}', '${{ matrix.ARCH }}'] name: > - LuaJIT with ASan and UBSan (Linux/x86_64) + LuaJIT with ASan and UBSan (${{ matrix.OS }}/${{ matrix.ARCH }}) ${{ matrix.BUILDTYPE }} CC:${{ matrix.CC }} GC64:ON SYSMALLOC:ON @@ -51,7 +67,13 @@ jobs: fetch-depth: 0 submodules: recursive - name: setup Linux for sanitizers - uses: ./.github/actions/setup-sanitizers + if: ${{ matrix.OS == 'Linux' }} + uses: ./.github/actions/setup-sanitizers-linux + with: + cc_name: ${{ matrix.CC }} + - name: setup macOS for sanitizers + if: ${{ matrix.OS == 'macOS' }} + uses: ./.github/actions/setup-sanitizers-macos with: cc_name: ${{ matrix.CC }} - name: configure @@ -77,11 +99,13 @@ jobs: - name: build run: cmake --build . --parallel working-directory: ${{ env.BUILDDIR }} - - name: test + + # Enable as much checks as possible. See more info here: + # https://github.com/google/sanitizers/wiki/AddressSanitizerFlags, + # https://github.com/google/sanitizers/wiki/SanitizerCommonFlags. + - name: setup sanitizer options for Linux + if: ${{ matrix.OS == 'Linux' }} env: - # Enable as much checks as possible. See more info here: - # https://github.com/google/sanitizers/wiki/AddressSanitizerFlags, - # https://github.com/google/sanitizers/wiki/SanitizerCommonFlags. ASAN_OPTIONS: " \ detect_invalid_pointer_pairs=1: \ detect_leaks=1: \ @@ -95,5 +119,28 @@ jobs: UBSAN_OPTIONS: " print_stacktrace=1 \ " + run: | + echo ASAN_OPTIONS=${ASAN_OPTIONS} | tee -a $GITHUB_ENV + echo UBSAN_OPTIONS=${UBSAN_OPTIONS} | tee -a $GITHUB_ENV + - name: setup sanitizer options for macOS + if: ${{ matrix.OS == 'macOS' }} + env: + ASAN_OPTIONS: " \ + detect_invalid_pointer_pairs=1: \ + detect_leaks=0: \ + detect_stack_use_after_return=1: \ + dump_instruction_bytes=1: \ + heap_profile=0: \ + print_suppressions=0: \ + symbolize=1: \ + unmap_shadow_on_exit=1: \ + " + UBSAN_OPTIONS: " + print_stacktrace=1 \ + " + run: | + echo ASAN_OPTIONS=${ASAN_OPTIONS} | tee -a $GITHUB_ENV + echo UBSAN_OPTIONS=${UBSAN_OPTIONS} | tee -a $GITHUB_ENV + - name: test run: cmake --build . --parallel --target LuaJIT-test working-directory: ${{ env.BUILDDIR }} -- 2.49.0