I just joined this list and am writing as a reply to a message from
Norbert Pfeiler on 2015-05-25.  He identified an minimal test program to
generate an error, at the end of the executable's run:
__gnu_cxx::__concurrence_lock_error when the libstdc++ Debug Mode
(bounds checking and the like) is enabled.

All that seems to be required is to declare a vector, map or set (or I
guess any Containers Library object), but not, at least, an int or a
string, so there is one such object before main(), and another inside
main().  A map outside and a set inside will cause the error.  Likewise
one or more vectors outside and one or more vectors inside.

This appears to be the problem underlying two other bug reports: firstly
for TDM-GCC, which I understand is derived from mingw-w64:

  https://sourceforge.net/p/tdm-gcc/bugs/264/

and secondly for GCC itself, which does not seem to be at fault, since
there is no such problem with the Linux version:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66096

All this activity is from about 2015-05-10, but I wrote more to the 264
bug above, and now to here, because the same problems occur with TDM-GCC
5.1.0, which was released on 2015-06-28.  In that bug 264, John E.
(TDM-GCC) stated that the problem was with winpthreads.

I lack the expertise and inclination to delve deeply into winpthreads or
any other innards of the library or compiler.  I hope some good soul
will do so.

The error occurs at the end of the program's execution, and would be not
so much of a problem for developers.  However, if it was desired for a
program to run in production with bounds checking enabled:
define _GLIBCXX_DEBUG or the compiler option -D_GLIBCXX_DEBUG:

   https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode.html

then these error messages would be problem.

 - Robin






------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to