Re: [Gc] "GC_is_visble_test failed" error on MS-Windows

Eli Zaretskii <eliz-mXXj517/[email protected]> Thu, 12 Jun 2014 20:24:02 +0300
Newsgroups gmane.comp.programming.garbage-collection.boehmgc
Message-ID <[email protected]>
> From: Ivan Maidanski <ivmai-JGs/[email protected]>
> Cc: [email protected]
> Date: Thu, 12 Jun 2014 12:44:16 +0400
> 
> The config you sent corresponds to single-threaded one
> (GC_WIN32_THREAD is not defined)

Yes.  This is the configuration that gives me trouble, the one
configured with --disable-threads.

> - I checked it with MinGW:
> gcc -I include -DHAVE_CONFIG_H tests/test.c extra/gc.c
> 
> So, I don't understand why you say it uses Win32 threads.

Sorry, I must have failed to explain myself.  I didn't say this
configuration used threads, I said that the configuration that omits
the --enable-threads option altogether uses Win32 threads.

While it sounds reasonable to use Win32 threads when none of the
--enable-threads and --disable-threads switches were specified, my
question is why the library configured with --disable-threads causes
the "GC_is_visble_test failed" error.  How is that error related to
threading?

> If you pass --disable-threads to the configure script, the
> built library does not use any threading API and does not have any support threads in the client app.

Right, I understand that.

> If your app uses pthreads but GC is not supporting pthreads (in case of MnGW, GC_WIN32_PTHREADS not defined) then garbage collection will malfunction.

No, the application didn't use threads, because I configured it not to
do so.  Are you saying that the "GC_is_visble_test failed" error is a
sign that the application tries to use some interface to libgc that
requires threading, and that is why the error happens?

Thanks again for your help and explanations.