Boost logo

Boost Users :

Subject: [Boost-users] [date_time] Concurrent posix_time streaming crashes under MinGW-32
From: Jim Bell (Jim_at_[hidden])
Date: 2011-03-02 23:20:35


The attached program crashes under MinGW-32 (gcc-4.4), but works under VC8.

It does concurrent streaming of posix_time::ptime values to a
std::ostringstream.

Mutexing the ostringstream from construction to destruction keeps it
from crashing, but that shouldn't have to be done for independent
streams. Mutexing just the ptime insertions makes it run longer, but it
still crashes.

I'm posting it here instead of taking it straight to Trac to see if
anyone has input. Could it be related to
<https://svn.boost.org/trac/boost/ticket/3961> or
<https://svn.boost.org/trac/boost/ticket/3369>?

Building:
MinGW:
g++ -DBOOST_THREAD_USE_LIB DTConcur.cpp
-IC:\Software\Open\lib\boost_1_45_0\ -DWIN32 -D_WINDOWS
-LC:\Software\Open\lib\boost_1_45_0\mgw44\lib -mthreads -g -frtti
-fexceptions -mthreads -Wall -lstdc++ -lmingw32 -o DTConcur
-lboost_thread-mgw44-mt-s-1_45

VC8:
cl DTConcur.cpp /IC:\Software\Open\lib\boost_1_45_0\ /MT /D
BOOST_THREAD_USE_LIB /GR /EHsc /D "WIN32" /D "_WINDOWS" /FeDTConcur.exe
/link /LIBPATH:C:\Software\Open\lib\boost_1_45_0\msvc8\lib




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net