15 Jun 2012 08:37
Re[2]: [Gc] FW: MinGW/msys on Windows 32 and 64 bit using pthreads-win32
Hi Eduard, What's about threads=win32 for Win64? (I have tried only test.c for some gc7.2alpha snapshot for Win64) I can't access Win64 right now but I tested gc7.3alpha using mingw32 (with Win32 threads model): C:\mingw-w32\bin\i686-w64-mingw32-gcc -O2 -fno-strict-aliasing -DALL_INTERIOR_POINTERS -DGC_GCJ_SUPPORT -DGC_THREADS -DTHREAD_LOCAL_ALLOC -DPARALLEL_MARK -DDONT_USE_USER32_DLL -I include -I libatomic_ops/src -s -Wall -Wextra tests/thread_leak_test.c extra/gc.c Cygwin (32-bit, posix threads) also passes this test. Regards, Ivan Thu, 14 Jun 2012 13:59:03 +0200 Eduard Urbach <e.urbach@...>: > Has anyone had success building the GC with MinGW 64 then? > > Using GCC 4.6 with threads = posix and x86_64-w64-mingw32 host the > following tests fail: > > threadleaktest.exe > test_cpp.exe > > On 32-bit systems with an absolutely normal MinGW 32 installation 14/15 > pass, but this one fails again: > > threadleaktest.exe > > I can't build gc7.3alpha2 to create 32 or 64 bit Windows binaries (well the > 32 bit one works on x86 but threakleadtest.exe still fails), is there > another solution to this problem - maybe another version? > > On Tue, Jun 12, 2012 at 4:51 PM, Bruce Mitchener > <bruce.mitchener@...>wrote: > > > I've not seen a workaround for this on Windows XP or Vista apart from > > shipping a separate 64 bit build. It is my understanding that this bug in > > WoW64 has been fixed in Windows 8. As long as you're calling > > GetThreadContext in a 32 bit app on 64 bit Windows prior to Windows 8, you > > will experience problems. > > > > - Bruce > > > > On Tue, Jun 12, 2012 at 9:05 PM, Boehm, Hans <hans.boehm@...> wrote: > > > >> Forwarding, since I’m travelling , and can’t easily approve this.**** > >> > >> ** ** > >> > >> Hans**** > >> > >> ** ** > >> > >> *From:* Eduard Urbach [mailto:e.urbach@...] > >> > >> **** > >> > >> ** ** > >> > >> Hello,**** > >> > >> ** ** > >> > >> I've been using Boehm GC successfully under Linux/Debian systems and I > >> thought the Windows versions was working as well until I tried it on 64 bit > >> systems. I am using these options:**** > >> > >> ** ** > >> > >> ./configure --enable-cplusplus --enable-threads=posix > >> --enable-thread-local-alloc --enable-parallel-mark**** > >> > >> ** ** > >> > >> Before including the GC:**** > >> > >> ** ** > >> > >> #ifdef _WIN32**** > >> > >> #define GC_WIN32_PTHREADS**** > >> > >> #else**** > >> > >> #define GC_THREADS**** > >> > >> #endif**** > >> > >> **** > >> > >> #define GC_OPERATOR_NEW_ARRAY**** > >> > >> #define PARALLEL_MARK**** > >> > >> #define USE_LIBC_PRIVATE**** > >> > >> **** > >> > >> // PThreads**** > >> > >> #ifndef _REENTRANT**** > >> > >> #define _REENTRANT**** > >> > >> #endif**** > >> > >> ** ** > >> > >> #ifndef _MULTI_THREADED**** > >> > >> #define _MULTI_THREADED**** > >> > >> #endif**** > >> > >> **** > >> > >> #ifdef _WIN32**** > >> > >> #include "../gc-7.3/gc_cpp.h"**** > >> > >> #else**** > >> > >> #include "../gc/gc_cpp.h"**** > >> > >> #endif**** > >> > >> ** ** > >> > >> I wrote a program which creates 4 threads where each thread creates a lot > >> of objects, if you want to test it you can download it here: > >> http://blitzprog.org/downloads/windows and run bp.Compiler.Benchmark in > >> multithreaded mode.**** > >> > >> On Win64 when I run it in multithreaded mode I get a message box saying > >> GetThreadContext() failed. A quick google search showed me I'm not the only > >> one having this problem and it seems to be related to WOW64.**** > >> > >> ** ** > >> > >> Compiling the GC with different configure options and compilers gave the > >> following results:**** > >> > >> ** ** > >> > >> > --------------------------------------------------------------------------------------------------------- > >> **** > >> > >> ** ** > >> > >> MinGW 32, GCC 4.6, Threads = win32, 64-bit host system, GC 7.3alpha2**** > >> > >> --> gctest crashes, rest works**** > >> > >> ** ** > >> > >> MinGW 32, GCC 4.7, Threads = win32, 64-bit host system, GC 7.3alpha2**** > >> > >> --> 3 tests fail, rest works (all threading related tests iirc, e.g. > >> threadleaks)**** > >> > >> ** ** > >> > >> MinGW 64, GCC 4.7, Threads = posix, 64-bit host system, GC 7.3alpha2**** > >> > >> --> Compile error (sorry for not having saved it...)**** > >> > >> ** ** > >> > >> > >> > --------------------------------------------------------------------------------------------------------- > >> **** > >> > >> ** ** > >> > >> MinGW 32, GCC 4.6, Threads = win32, 32-bit host system, GC 7.2 **** > >> > >> --> all tests pass, however I need pthreads-win32**** > >> > >> ** ** > >> > >> MinGW 32, GCC 4.6, Threads = posix, 32-bit host system, GC 7.2 **** > >> > >> --> Configure fails, can't get it to use pthreads-win32**** > >> > >> ** ** > >> > >> MinGW 32, GCC 4.6, Threads = posix, 32-bit host system, GC 7.3alpha2**** > >> > >> --> 1 test fails (threadleaks crashes) but my multithreaded test > >> application is running fine**** > >> > >> --> The same application run on 64-bit Windows leads to a message box > >> saying GetThreadContext() failed**** > >> > >> ** ** > >> > >> > --------------------------------------------------------------------------------------------------------- > >> **** > >> > >> ** ** > >> > >> Basically I am trying to find a way to get the GC running with > >> pthreads-win32 on 32- and 64-Bit Windows using either MinGW 32 or MinGW 64, > >> whatever works. I am not really interested in building native 64-bit > >> binaries for Windows but I want my 32-bit applications to run normally on a > >> 64-bit system.**** > >> > >> ** ** > >> > >> I am willing to help out if you need more information, I have a 32- and > >> 64-bit Windows system running and both lead to at least 1 test failing on > >> make check. On Debian/Ubuntu everything works fine, though :)**** > >> > >> ** ** > >> > >> Regards,**** > >> > >> Eduard Urbach**** > >> > >> _______________________________________________ > >> Gc mailing list > >> Gc@... > >> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/ > >> > > > >
RSS Feed