**Symptom**: after a successful `make` half of the `make check` testsuites are failing, mainly MPI related:
```
PASS: version.exe
FAIL: mpitests.exe
PASS: t-sexp.exe
PASS: t-convert.exe
FAIL: t-mpi-bit.exe
FAIL: t-mpi-point.exe
FAIL: curves.exe
PASS: t-lock.exe
FAIL: prime.exe
FAIL: basic.exe
/bin/sh: line 5: 48560 Segmentation fault GCRYPT_IN_REGRESSION_TEST=1 ${dir}$tst
FAIL: keygen.exe
FAIL: pubkey.exe
```
libgcrypt: 1.7.6
OS: Windows 10 64-bit
Using the binaries from: [[ https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-libgcrypt | MSYS2/MINGW64 ]] build
I have reported the issue as well [[ https://github.com/Alexpux/MINGW-packages/issues/2460 | there ]] for more insights, but so far no reply.
I have tried to debug the reason for failure in `mpitest.exe`, and was able to figure out the following:
1. First failure is at [[ https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=blob;f=tests/mpitests.c;h=18156d1b2db11c287c53f05295b125af1df2c5b0;hb=refs/heads/master#l574 | test_add ]] which results a SIGSEGV upon calling [[ https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=blob;f=tests/mpitests.c;h=18156d1b2db11c287c53f05295b125af1df2c5b0;hb=refs/heads/master#l373 | gcry_mpi_release (result);]]
2. If you comment out [[ https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=blob;f=tests/mpitests.c;h=18156d1b2db11c287c53f05295b125af1df2c5b0;hb=refs/heads/master#l358 | gcry_mpi_add ]], no SIGSEGV at gcry_mpi_release (result);
3. The call to [[ https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=blob;f=mpi/mpi-add.c;h=53f476e0605ab344641fb2eb1632de4f04f9c48c;hb=refs/heads/master#l148 | _gcry_mpih_add ]] returns 0, which seems to me odd
4. The subsequent asm code (in `mpih-add1-asm.S`) I was not able to debug - lack of knowledge, unfortunately