From 77837d6f29c61c53d74ce5dd2fa333f52fdfba00 Mon Sep 17 00:00:00 2001 From: Alexandr Nedvedicky Date: Thu, 18 Apr 2024 17:14:18 +0200 Subject: [PATCH] fix crash in ecp_nistz256_point_add_affine() The .rodata section with precomputed constant `ecp_nistz256_precomputed` needs to be terminated by .text, because the ecp_nistz256_precomputed' happens to be the first section in the file. The lack of .text makes code to arrive into the same .rodata section where ecp_nistz256_precomputed is found. The exception is raised as soon as CPU attempts to execute the code from read only section. Fixes #24184 --- .github/workflows/windows.yml | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 1df44c4f0094b4..65f8984de30b19 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -183,3 +183,60 @@ jobs: # Disable testing for now. TBD: Need local cygwin installation to debug . # - name: Run openssl tests # run: bash -c "cd openssl && make V=1 test" + mingw: + # Run a job for each of the specified target architectures: + strategy: + matrix: + os: + - windows-2022 + platform: + - arch: win64 + config: -DCMAKE_C_COMPILER=gcc --strict-warnings enable-demos no-fips + runs-on: ${{ github.server_url == 'https://github.com' && matrix.os || format('{0}-self-hosted', matrix.os) }} + env: + CYGWIN_NOWINPATH: 1 + SHELLOPTS: igncr + MAKE_PARAMS: -j 4 + steps: + - uses: actions/checkout@v4 + - uses: cygwin/cygwin-install-action@master + with: + packages: perl git make gcc-core + - name: Install MinGW + uses: egor-tensin/setup-mingw@v2 + with: + platform: x64 + cygwin: 1 + - name: prepare the build directory + run: mkdir _build + - name: config + working-directory: _build + run: | + #perl ..\Configure --banner=Configured no-makedepend ${{ matrix.platform.config }} + perl ..\Configure --banner=Configured no-makedepend mingw + perl configdata.pm --dump + - name: build + working-directory: _build + run: nmake # verbose, so no /S here + - name: download coreinfo + uses: suisei-cn/actions-download-file@v1.6.0 + with: + url: "https://download.sysinternals.com/files/Coreinfo.zip" + target: _build/coreinfo/ + - name: get cpu info + working-directory: _build + continue-on-error: true + run: | + 7z.exe x coreinfo/Coreinfo.zip + ./Coreinfo64.exe -accepteula -f + ./apps/openssl.exe version -c + - name: save artifacts + uses: actions/upload-artifact@v3 + with: + name: "ci@-${{ matrix.os }}" + path: _build + if-no-files-found: ignore + retention-days: 2 + - name: test + working-directory: _build + run: nmake test VERBOSE_FAILURE=yes TESTS=-test_fuzz* HARNESS_JOBS=4