Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH luajit v2 0/3] build: fixed making tests with ASAN on OSX
@ 2026-07-31 19:11 Evgeniy Temirgaleev via Tarantool-patches
  2026-07-31 19:12 ` [Tarantool-patches] [PATCH luajit v2 1/3] " Evgeniy Temirgaleev via Tarantool-patches
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Evgeniy Temirgaleev via Tarantool-patches @ 2026-07-31 19:11 UTC (permalink / raw)
  To: Sergey Kaplun, Sergey Bronnikov; +Cc: tarantool-patches

This patch fixes building of the LuaJIT tests with sanitizer checks
on macOS. The fix is in the first commit. The second commit enables
sanitizer checks on macOS in CI. The third contains 'other changes'
which is helpful to debug new CI behavior.

Changes in v2:
  - CI updated.

Branch: https://github.com/tarantool/luajit/tree/tmr_g/lj-noticket-fix-test-build-mac

Temir Galeev (3):
  build: fixed making tests with ASAN on OSX
  ci: enabled sanitizer tests for macOS
  ci: added a common way to disable perfomance workflow

 .../README.md                                 |  0
 .../action.yml                                |  0
 .../actions/setup-sanitizers-macos/README.md  | 12 ++++
 .../actions/setup-sanitizers-macos/action.yml | 18 +++++
 .github/workflows/performance.yml             |  1 +
 .github/workflows/sanitizers-testing.yml      | 65 ++++++++++++++++---
 test/LuaJIT-tests/CMakeLists.txt              |  3 +-
 7 files changed, 89 insertions(+), 10 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

-- 
2.49.0


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

* [Tarantool-patches] [PATCH luajit v2 1/3] build: fixed making tests with ASAN on OSX
  2026-07-31 19:11 [Tarantool-patches] [PATCH luajit v2 0/3] build: fixed making tests with ASAN on OSX Evgeniy Temirgaleev via Tarantool-patches
@ 2026-07-31 19:12 ` Evgeniy Temirgaleev via Tarantool-patches
  2026-08-04 12:59   ` Sergey Kaplun via Tarantool-patches
  2026-08-04 20:53   ` Sergey Kaplun via Tarantool-patches
  2026-07-31 19:12 ` [Tarantool-patches] [PATCH luajit v2 2/3] ci: enabled sanitizer tests for macOS Evgeniy Temirgaleev via Tarantool-patches
  2026-07-31 19:12 ` [Tarantool-patches] [PATCH luajit v2 3/3] ci: added a common way to disable perfomance workflow Evgeniy Temirgaleev via Tarantool-patches
  2 siblings, 2 replies; 12+ messages in thread
From: Evgeniy Temirgaleev via Tarantool-patches @ 2026-07-31 19:12 UTC (permalink / raw)
  To: Sergey Kaplun, Sergey Bronnikov; +Cc: tarantool-patches

From: Temir Galeev <temir.galeev@bk.ru>

LuaJIT tests use fixup for Linux to run binaries maked with ASAN option.
The our LibRealPath module used for it. This module doesn't support OSX
and breaks the make process.

So, we disable the fixup for OSX to allow LuaJIT making and running the tests
with ASAN enabled.
---
 test/LuaJIT-tests/CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/LuaJIT-tests/CMakeLists.txt b/test/LuaJIT-tests/CMakeLists.txt
index c1dbde35..42967cbc 100644
--- a/test/LuaJIT-tests/CMakeLists.txt
+++ b/test/LuaJIT-tests/CMakeLists.txt
@@ -17,7 +17,8 @@ else()
   list(APPEND LUAJIT_TESTS_ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}")
 endif()
 
-if(LUAJIT_USE_ASAN)
+if(LUAJIT_USE_ASAN
+   AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
   # When running LuaJIT-tests under ASAN, the internal ASAN check
   # failed:
   # AddressSanitizer: CHECK failed: asan_interceptors.cpp:356
-- 
2.49.0


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

* [Tarantool-patches] [PATCH luajit v2 2/3] ci: enabled sanitizer tests for macOS
  2026-07-31 19:11 [Tarantool-patches] [PATCH luajit v2 0/3] build: fixed making tests with ASAN on OSX Evgeniy Temirgaleev via Tarantool-patches
  2026-07-31 19:12 ` [Tarantool-patches] [PATCH luajit v2 1/3] " Evgeniy Temirgaleev via Tarantool-patches
@ 2026-07-31 19:12 ` Evgeniy Temirgaleev via Tarantool-patches
  2026-08-04 12:55   ` Sergey Kaplun via Tarantool-patches
  2026-07-31 19:12 ` [Tarantool-patches] [PATCH luajit v2 3/3] ci: added a common way to disable perfomance workflow Evgeniy Temirgaleev via Tarantool-patches
  2 siblings, 1 reply; 12+ messages in thread
From: Evgeniy Temirgaleev via Tarantool-patches @ 2026-07-31 19:12 UTC (permalink / raw)
  To: Sergey Kaplun, Sergey Bronnikov; +Cc: tarantool-patches

From: Temir Galeev <temir.galeev@bk.ru>

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


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

* [Tarantool-patches] [PATCH luajit v2 3/3] ci: added a common way to disable perfomance workflow
  2026-07-31 19:11 [Tarantool-patches] [PATCH luajit v2 0/3] build: fixed making tests with ASAN on OSX Evgeniy Temirgaleev via Tarantool-patches
  2026-07-31 19:12 ` [Tarantool-patches] [PATCH luajit v2 1/3] " Evgeniy Temirgaleev via Tarantool-patches
  2026-07-31 19:12 ` [Tarantool-patches] [PATCH luajit v2 2/3] ci: enabled sanitizer tests for macOS Evgeniy Temirgaleev via Tarantool-patches
@ 2026-07-31 19:12 ` Evgeniy Temirgaleev via Tarantool-patches
  2026-08-04 13:00   ` Sergey Kaplun via Tarantool-patches
  2026-08-04 20:48   ` Sergey Kaplun via Tarantool-patches
  2 siblings, 2 replies; 12+ messages in thread
From: Evgeniy Temirgaleev via Tarantool-patches @ 2026-07-31 19:12 UTC (permalink / raw)
  To: Sergey Kaplun, Sergey Bronnikov; +Cc: tarantool-patches

From: Temir Galeev <temir.galeev@bk.ru>

This allow a quick disable of all but one workflow to debug new ci behavior.

The way is to substitue '**-notest' with 'your-branch-name' temporarily
on other workflows while debugging the target workflow.
---
 .github/workflows/performance.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml
index fe22eb4b..a872a265 100644
--- a/.github/workflows/performance.yml
+++ b/.github/workflows/performance.yml
@@ -3,6 +3,7 @@ name: Performance
 on:
   push:
     branches-ignore:
+      - '**-notest'
       - '**-noperf'
       - 'tarantool/release/**'
       - 'upstream-**'
-- 
2.49.0


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

* Re: [Tarantool-patches] [PATCH luajit v2 2/3] ci: enabled sanitizer tests for macOS
  2026-07-31 19:12 ` [Tarantool-patches] [PATCH luajit v2 2/3] ci: enabled sanitizer tests for macOS Evgeniy Temirgaleev via Tarantool-patches
@ 2026-08-04 12:55   ` Sergey Kaplun via Tarantool-patches
  2026-08-05 19:48     ` Evgeniy Temirgaleev via Tarantool-patches
  0 siblings, 1 reply; 12+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2026-08-04 12:55 UTC (permalink / raw)
  To: Evgeniy Temirgaleev; +Cc: tarantool-patches

Hi, Evgeniy!
Thanks for the patch!
Please, consider my questions below.

On 31.07.26, Evgeniy Temirgaleev wrote:
> From: Temir Galeev <temir.galeev@bk.ru>
> 
> 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

<snipped>

> 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

For macOS this looks weird, since we just use the default compiler anyway.
Is it possible to specify compiler version on macOS?

> +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]

Side note: For local x86_64 macOS, I can't build LuaJIT with enabled
since ASAN just can't be initialized. Hence it leads to buildvm
crashes. I suppose there is some issue with modern clang. So, the
version specification is desirable.

>          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

These excludes looks too drammatic. Have you considering include option instead?
Does it look better/more compact?

> +    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

<snipped>

>            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:                  \

Why do we need to exclude detect_leaks for macOS?

> +            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
> 

-- 
Best regards,
Sergey Kaplun

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

* Re: [Tarantool-patches] [PATCH luajit v2 1/3] build: fixed making tests with ASAN on OSX
  2026-07-31 19:12 ` [Tarantool-patches] [PATCH luajit v2 1/3] " Evgeniy Temirgaleev via Tarantool-patches
@ 2026-08-04 12:59   ` Sergey Kaplun via Tarantool-patches
  2026-08-04 20:53   ` Sergey Kaplun via Tarantool-patches
  1 sibling, 0 replies; 12+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2026-08-04 12:59 UTC (permalink / raw)
  To: Evgeniy Temirgaleev; +Cc: tarantool-patches

Hi, Evgeniy!
Thanks for the patch!
LGTM!

-- 
Best regards,
Sergey Kaplun

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

* Re: [Tarantool-patches] [PATCH luajit v2 3/3] ci: added a common way to disable perfomance workflow
  2026-07-31 19:12 ` [Tarantool-patches] [PATCH luajit v2 3/3] ci: added a common way to disable perfomance workflow Evgeniy Temirgaleev via Tarantool-patches
@ 2026-08-04 13:00   ` Sergey Kaplun via Tarantool-patches
  2026-08-04 20:48   ` Sergey Kaplun via Tarantool-patches
  1 sibling, 0 replies; 12+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2026-08-04 13:00 UTC (permalink / raw)
  To: Evgeniy Temirgaleev; +Cc: tarantool-patches

Evgeniy,
Thanks for the patch!
LGTM!

-- 
Best regards,
Sergey Kaplun

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

* Re: [Tarantool-patches] [PATCH luajit v2 3/3] ci: added a common way to disable perfomance workflow
  2026-07-31 19:12 ` [Tarantool-patches] [PATCH luajit v2 3/3] ci: added a common way to disable perfomance workflow Evgeniy Temirgaleev via Tarantool-patches
  2026-08-04 13:00   ` Sergey Kaplun via Tarantool-patches
@ 2026-08-04 20:48   ` Sergey Kaplun via Tarantool-patches
  2026-08-05 19:30     ` Evgeniy Temirgaleev via Tarantool-patches
  1 sibling, 1 reply; 12+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2026-08-04 20:48 UTC (permalink / raw)
  To: Evgeniy Temirgaleev; +Cc: tarantool-patches

Sorry, I've noticed a bunch of nits regarding the commit message.
LGTM, after fixing.

> ci: added a common way to disable perfomance workflow

The commit header length is more than 50 symbols [1].

> This allow a quick disable of all but one workflow to debug new ci behavior.

The commit body length is more than 72 symbols [1].
Typo: s/allow/allows/
Typo: s/ci/CI/

[1]: https://github.com/tarantool/tarantool/wiki/Code-review-procedure#commit-message

-- 
Best regards,
Sergey Kaplun

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

* Re: [Tarantool-patches] [PATCH luajit v2 1/3] build: fixed making tests with ASAN on OSX
  2026-07-31 19:12 ` [Tarantool-patches] [PATCH luajit v2 1/3] " Evgeniy Temirgaleev via Tarantool-patches
  2026-08-04 12:59   ` Sergey Kaplun via Tarantool-patches
@ 2026-08-04 20:53   ` Sergey Kaplun via Tarantool-patches
  2026-08-05 19:27     ` Evgeniy Temirgaleev via Tarantool-patches
  1 sibling, 1 reply; 12+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2026-08-04 20:53 UTC (permalink / raw)
  To: Evgeniy Temirgaleev; +Cc: tarantool-patches

Sorry, I've noticed some nits regarding the commit message.
LGTM, after fixing.

> build: fixed making tests with ASAN on OSX

It also may use tag `test:`, Feel free to ignore.

On 31.07.26, Evgeniy Temirgaleev wrote:
> From: Temir Galeev <temir.galeev@bk.ru>
> 
> LuaJIT tests use fixup for Linux to run binaries maked with ASAN option.

Typo: s/maked/made/ or s/maked/built/
Typo: s/ASAN/the ASAN/

> The our LibRealPath module used for it. This module doesn't support OSX

Typo: s/The our/Our/
Typo: s/used/is used/

> and breaks the make process.
> 
> So, we disable the fixup for OSX to allow LuaJIT making and running the tests

Commit message body is more than 72 symbols [1].

> with ASAN enabled.

<snipped>

[1]: https://github.com/tarantool/tarantool/wiki/Code-review-procedure#commit-message

-- 
Best regards,
Sergey Kaplun

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

* Re: [Tarantool-patches]  [PATCH luajit v2 1/3] build: fixed making tests with ASAN on OSX
  2026-08-04 20:53   ` Sergey Kaplun via Tarantool-patches
@ 2026-08-05 19:27     ` Evgeniy Temirgaleev via Tarantool-patches
  0 siblings, 0 replies; 12+ messages in thread
From: Evgeniy Temirgaleev via Tarantool-patches @ 2026-08-05 19:27 UTC (permalink / raw)
  To: Sergey Kaplun; +Cc: tarantool-patches

[-- Attachment #1: Type: text/plain, Size: 1272 bytes --]

Thanks for review!
I fixed the issues. I shall push the result in the patch v3.
--
Best regards,
Evgeniy Temirgaleev

> 
> From: Sergey Kaplun <skaplun@tarantool.org>
> To: Evgeniy Temirgaleev <e.temirgaleev@tarantool.org>
> Cc: Sergey Bronnikov <sergeyb@tarantool.org>, tarantool-patches@dev.tarantool.org
> 
> Date: Tuesday, August 4, 2026 11:53 PM +03:00
> Sorry, I've noticed some nits regarding the commit message.
> LGTM, after fixing.
> 
> > build: fixed making tests with ASAN on OSX
> 
> It also may use tag `test:`, Feel free to ignore.
> 
> On 31.07.26, Evgeniy Temirgaleev wrote:
> > From: Temir Galeev <temir.galeev@bk.ru>
> >
> > LuaJIT tests use fixup for Linux to run binaries maked with ASAN option.
> 
> 
> Typo: s/maked/made/ or s/maked/built/
> Typo: s/ASAN/the ASAN/
> 
> > The our LibRealPath module used for it. This module doesn't support OSX
> 
> Typo: s/The our/Our/
> Typo: s/used/is used/
> 
> > and breaks the make process.
> >
> > So, we disable the fixup for OSX to allow LuaJIT making and running the
> tests
> 
> Commit message body is more than 72 symbols [1].
> 
> > with ASAN enabled.
> 
> <snipped>
> 
> [1]: https://github.com/tarantool/tarantool/wiki/Code-review-procedure#commit-message
> 
> 
> --
> Best regards,
> Sergey Kaplun
>

[-- Attachment #2: Type: text/html, Size: 2262 bytes --]

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

* Re: [Tarantool-patches]  [PATCH luajit v2 3/3] ci: added a common way to disable perfomance workflow
  2026-08-04 20:48   ` Sergey Kaplun via Tarantool-patches
@ 2026-08-05 19:30     ` Evgeniy Temirgaleev via Tarantool-patches
  0 siblings, 0 replies; 12+ messages in thread
From: Evgeniy Temirgaleev via Tarantool-patches @ 2026-08-05 19:30 UTC (permalink / raw)
  To: Sergey Kaplun; +Cc: tarantool-patches

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

Thanks for review!
I fixed the issues. I shall push the result in the patch v3.
--
Best regards,
Evgeniy Temirgaleev

> 
> From: Sergey Kaplun <skaplun@tarantool.org>
> To: Evgeniy Temirgaleev <e.temirgaleev@tarantool.org>
> Cc: Sergey Bronnikov <sergeyb@tarantool.org>, tarantool-patches@dev.tarantool.org
> 
> Date: Tuesday, August 4, 2026 11:48 PM +03:00
> Sorry, I've noticed a bunch of nits regarding the commit message.
> LGTM, after fixing.
> 
> > ci: added a common way to disable perfomance workflow
> 
> The commit header length is more than 50 symbols [1].
> 
> > This allow a quick disable of all but one workflow to debug new ci
> behavior.
> 
> The commit body length is more than 72 symbols [1].
> Typo: s/allow/allows/
> Typo: s/ci/CI/
> 
> [1]: https://github.com/tarantool/tarantool/wiki/Code-review-procedure#commit-message
> 
> 
> --
> Best regards,
> Sergey Kaplun
>

[-- Attachment #2: Type: text/html, Size: 1791 bytes --]

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

* Re: [Tarantool-patches]  [PATCH luajit v2 2/3] ci: enabled sanitizer tests for macOS
  2026-08-04 12:55   ` Sergey Kaplun via Tarantool-patches
@ 2026-08-05 19:48     ` Evgeniy Temirgaleev via Tarantool-patches
  0 siblings, 0 replies; 12+ messages in thread
From: Evgeniy Temirgaleev via Tarantool-patches @ 2026-08-05 19:48 UTC (permalink / raw)
  To: Sergey Kaplun; +Cc: tarantool-patches

[-- Attachment #1: Type: text/plain, Size: 6855 bytes --]

Hi, Sergey! Thanks for review!

> 
> From: Sergey Kaplun <skaplun@tarantool.org>
> To: Evgeniy Temirgaleev <e.temirgaleev@tarantool.org>
> Cc: Sergey Bronnikov <sergeyb@tarantool.org>, tarantool-patches@dev.tarantool.org
> 
> Date: Tuesday, August 4, 2026 3:56 PM +03:00
> Hi, Evgeniy!
> Thanks for the patch!
> Please, consider my questions below.
> 
> On 31.07.26, Evgeniy Temirgaleev wrote:
> > From: Temir Galeev <temir.galeev@bk.ru>
> >
> > 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
> 
> <snipped>
> 
> > 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
> 
> For macOS this looks weird, since we just use the default compiler anyway.
> 
> Is it possible to specify compiler version on macOS?
> 

None. The reason to add this action is the saving the logic of similar ‘setup-sanitizer-linux’ action, which is defines compiler for next steps.

But I rewrite this action completely to allow compiler selection. I shall present it in the patch v3.

> 
> 
> > +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]
> 
> Side note: For local x86_64 macOS, I can't build LuaJIT with enabled
> since ASAN just can't be initialized. Hence it leads to buildvm
> crashes. I suppose there is some issue with modern clang. So, the
> version specification is desirable.
> 

Thanks for the notice. It’s done in the patch v3. The experience showed that the compiler version may have significant influence on the succession of ASAN building and testing.

> 
> 
> > 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
> 
> These excludes looks too drammatic. Have you considering include option
> instead?
> Does it look better/more compact?
> 

I tried with include. It doesn’t help to make things better.

> 
> 
> > + 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
> 
> <snipped>
> 
> > 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: \
> 
> Why do we need to exclude detect_leaks for macOS?
> 

For the builtin macOS compiler (clang 17) this option isn’t supported. I got an ‘not supported for the platform’ error.
But for newest versions of gcc/clang it works. I set this option to ‘on’ in the patch v3.

> 
> 
> > + 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
> >
> 
> --
> Best regards,
> Sergey Kaplun
> 

--
Best regards,
Evgeniy Temirgaleev

[-- Attachment #2: Type: text/html, Size: 9460 bytes --]

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

end of thread, other threads:[~2026-08-05 19:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-31 19:11 [Tarantool-patches] [PATCH luajit v2 0/3] build: fixed making tests with ASAN on OSX Evgeniy Temirgaleev via Tarantool-patches
2026-07-31 19:12 ` [Tarantool-patches] [PATCH luajit v2 1/3] " Evgeniy Temirgaleev via Tarantool-patches
2026-08-04 12:59   ` Sergey Kaplun via Tarantool-patches
2026-08-04 20:53   ` Sergey Kaplun via Tarantool-patches
2026-08-05 19:27     ` Evgeniy Temirgaleev via Tarantool-patches
2026-07-31 19:12 ` [Tarantool-patches] [PATCH luajit v2 2/3] ci: enabled sanitizer tests for macOS Evgeniy Temirgaleev via Tarantool-patches
2026-08-04 12:55   ` Sergey Kaplun via Tarantool-patches
2026-08-05 19:48     ` Evgeniy Temirgaleev via Tarantool-patches
2026-07-31 19:12 ` [Tarantool-patches] [PATCH luajit v2 3/3] ci: added a common way to disable perfomance workflow Evgeniy Temirgaleev via Tarantool-patches
2026-08-04 13:00   ` Sergey Kaplun via Tarantool-patches
2026-08-04 20:48   ` Sergey Kaplun via Tarantool-patches
2026-08-05 19:30     ` Evgeniy Temirgaleev 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