Use mingw build x86_64-4.9.1-release-posix-seh-rt_v3-rev2.7z to build Aspell 0.60.6.1:
./configure --prefix=/mingw/x86_64-w64-mingw32 && make install
Then compile the following program (testaspell.c):
#include <stdio.h> #include <aspell.h> int main() { aspell_reset_cache(NULL); return 0; }
with:
gcc testaspell.c -laspell -o testaspell.exe
Debug it with gdb:
(gdb) r Starting program: e:\Lib\testaspell.exe [New Thread 7900.0x1630] Program received signal SIGSEGV, Segmentation fault. 0x0000000064942fec in pthread_mutex_init () from d:\mingw64\opt\bin\libwinpthread-1.dll (gdb) bt #0 0x0000000064942fec in pthread_mutex_init () from d:\mingw64\opt\bin\libwinpthread-1.dll #1 0x00000000649430a2 in pthread_mutex_init () from d:\mingw64\opt\bin\libwinpthread-1.dll #2 0x0000000067c41873 in lock (this=0x392590) at ../common/lock.hpp:39 #3 Lock (l=0x392590, this=<synthetic pointer>) at ../common/lock.hpp:61 #4 acommon::GlobalCacheBase::~GlobalCacheBase ( this=0x67ce91e0 <acommon::decode_cache>, __in_chrg=<optimized out>) at ../common/cache.cpp:83 #5 0x0000000067c411c6 in _CRT_INIT () from D:\mingw64\x86_64-w64-mingw32\bin\libaspell-15.dll #6 0x0000000067c4139c in __DllMainCRTStartup () from D:\mingw64\x86_64-w64-mingw32\bin\libaspell-15.dll #7 0x0000000076d743a1 in ntdll!LdrShutdownProcess () from C:\Windows\SYSTEM32\ntdll.dll #8 0x0000000076d741b0 in ntdll!RtlExitUserProcess () from C:\Windows\SYSTEM32\ntdll.dll #9 0x000007fefe0899e2 in msvcrt!_wcstoui64 () from C:\Windows\system32\msvcrt.dll #10 0x00000000004014a5 in __tmainCRTStartup () #11 0x00000000004014e8 in mainCRTStartup () (gdb)
Everything was fine when using gcc 4.8.2.
I'm test on MSYS2 with our mingw-w64 toolchains (GCC 4.9.2) and aspell packages. Everything is ok for me.
Regards,
Alexey.