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.2.0~39^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c0e87e658cb265e3b8b6ee71b18d8b74a7bfaaad;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 c91e939c5..e36712042 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.8", 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"} @@ -117,6 +120,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