From d260e348290e17450319b6148b611926eed3152f Mon Sep 17 00:00:00 2001 From: Mike <45243121+tankf33der@users.noreply.github.com> Date: Thu, 20 Nov 2025 12:16:39 +0200 Subject: [PATCH] ci: add new job `sanitize-address-clang-without-gc` that passes `-gc none` through VFLAGS (#25780) * ci: new job sanitize-address-clang-without-gc * ci: mark map_generic_call_test.v and comptime_map_it_test.v for skipping on the new sanitize-address-clang-without-gc job --------- Co-authored-by: Delyan Angelov --- .github/workflows/sanitized_ci.yml | 36 ++++++++++++++++--- .../builtin_maps/map_generic_call_test.v | 1 + vlib/v/tests/comptime/comptime_map_it_test.v | 1 + 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sanitized_ci.yml b/.github/workflows/sanitized_ci.yml index 25b2f532b..aec9891fe 100644 --- a/.github/workflows/sanitized_ci.yml +++ b/.github/workflows/sanitized_ci.yml @@ -93,7 +93,7 @@ jobs: run: ./v -silent test-cleancode - name: Install dependencies run: | - .github/workflows/disable_azure_mirror.sh + .github/workflows/disable_azure_mirror.sh ./v retry -- sudo apt update ./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev @@ -123,7 +123,7 @@ jobs: run: ./v -silent test-cleancode - name: Install dependencies run: | - .github/workflows/disable_azure_mirror.sh + .github/workflows/disable_azure_mirror.sh ./v retry -- sudo apt update ./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev @@ -153,7 +153,7 @@ jobs: run: ./v -silent test-cleancode - name: Install dependencies run: | - .github/workflows/disable_azure_mirror.sh + .github/workflows/disable_azure_mirror.sh ./v retry -- sudo apt update ./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev @@ -210,7 +210,7 @@ jobs: run: ./v -silent test-cleancode - name: Install dependencies run: | - .github/workflows/disable_azure_mirror.sh + .github/workflows/disable_azure_mirror.sh ./v retry -- sudo apt update ./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev @@ -241,7 +241,7 @@ jobs: run: ./v -silent test-cleancode - name: Install dependencies run: | - .github/workflows/disable_azure_mirror.sh + .github/workflows/disable_azure_mirror.sh ./v retry -- sudo apt update ./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev @@ -256,3 +256,29 @@ jobs: ./v -cc tcc -silent test-self -msan-compiler vlib - name: Build examples (V compiled with -fsanitize=memory) run: ./v -silent build-examples + + sanitize-address-clang-without-gc: + runs-on: ubuntu-22.04 + timeout-minutes: 300 + env: + VFLAGS: -cc clang -gc none -cflags -fno-omit-frame-pointer + VJOBS: 1 + LSAN_OPTIONS: detect_leaks=0 + VNATIVE_SKIP_LIBC_VV: 1 + steps: + - uses: actions/checkout@v5 + - name: Build V + run: make -j4 && ./v symlink + - name: Ensure code is well formatted + run: ./v -silent test-cleancode + - name: Install dependencies + run: | + .github/workflows/disable_azure_mirror.sh + ./v retry -- sudo apt update + ./v retry -- sudo apt install --quiet -y postgresql libpq-dev libssl-dev sqlite3 libsqlite3-dev valgrind + ./v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev + ./v retry -- sudo apt install clang + - name: Recompile V with -cstrict + run: ./v -cg -cstrict -o v cmd/v + - name: Self tests (-fsanitize=address) + run: ./v -cflags -fsanitize=address -silent test-self vlib diff --git a/vlib/v/tests/builtin_maps/map_generic_call_test.v b/vlib/v/tests/builtin_maps/map_generic_call_test.v index 61731dc60..919003857 100644 --- a/vlib/v/tests/builtin_maps/map_generic_call_test.v +++ b/vlib/v/tests/builtin_maps/map_generic_call_test.v @@ -1,3 +1,4 @@ +// vtest build: !sanitize-address-clang-without-gc struct FooParams[K, V] { k K v V diff --git a/vlib/v/tests/comptime/comptime_map_it_test.v b/vlib/v/tests/comptime/comptime_map_it_test.v index d2c532f59..739a49328 100644 --- a/vlib/v/tests/comptime/comptime_map_it_test.v +++ b/vlib/v/tests/comptime/comptime_map_it_test.v @@ -1,3 +1,4 @@ +// vtest build: !sanitize-address-clang-without-gc type Any = []Any | f64 | int | map[string]Any | string struct Arr { -- 2.39.5