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.exelibgcrypt: 1.7.6
OS: Windows 10 64-bit
Using the binaries from: MSYS2/MINGW64 build. You can find the build output for 1.7.5 here to see how it has been built.
I have reported the issue as well 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:
- First failure is at test_add which results a SIGSEGV upon calling gcry_mpi_release (result);
- If you comment out gcry_mpi_add, no SIGSEGV at gcry_mpi_release (result);
- The call to _gcry_mpih_add returns 0, which seems to me odd
- The subsequent asm code (in mpih-add1-asm.S) I was not able to debug - lack of knowledge, unfortunately