From: Daniele Varrazzo Date: Wed, 10 Apr 2024 23:24:02 +0000 (+0200) Subject: ci: add test to check for misaligned memory access X-Git-Tag: 3.1.19~4^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=611738ff3626e7f0d35d66c934653220a7248bbe;p=thirdparty%2Fpsycopg.git ci: add test to check for misaligned memory access --- diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1e056069e..8ebaf330c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,6 +48,9 @@ jobs: # Test with minimum dependencies versions - {impl: c, python: "3.7", ext: min, postgres: "postgres:15"} + # Test memory alignment + - {impl: c, python: "3.12", ext: align, postgres: "postgres:16"} + # Test with PyPy. - {impl: python, python: "pypy3.9", postgres: "postgres:13"} - {impl: python, python: "pypy3.10", postgres: "postgres:14"} @@ -112,6 +115,13 @@ jobs: echo "PIP_CONSTRAINT=${{ github.workspace }}/tests/constraints.txt" \ >> $GITHUB_ENV + - name: Configure memory alignment tests + if: ${{ matrix.ext == 'align' }} + run: | + echo "CFLAGS=-fsanitize=undefined" >> $GITHUB_ENV + echo "UBSAN_OPTIONS=halt_on_error=1" >> $GITHUB_ENV + echo "PYTEST_ADDOPTS=-v" >> $GITHUB_ENV + - name: Install Python packages run: pip install $DEPS