Why not just use STLPort? http://www.stlport.org/
On Aug 23, 2004, at 10:51 AM, Pasquale d'Aloise wrote:
> My application (compiled using Visual Studio 6.0)=A0is affected by=20
> random corruptions of data as other developers have mentioned.
> =A0
> I found a recent Microsoft article about STL string use in=20
> multithreading environment:
> http://support.microsoft.com/default.aspx?scid=3Dkb;en-us;813810
> that can explain such a behaviour.
> =A0
> In QuickFIX, common fields data, such as BeginString, SenderCompID,=20
> TargetCompID, are filled in message by copying them from the original=20=
> values in Session::m_sessionID (see the function Session::fill() );=20
> concurrently, the same values are accessed by the incoming messages=20
> thread to make validity checks (see the functions=20
> Session::isCorrectCompID()=A0and Session::next(const Message& message)=20=
> ).
> =A0
> Sometimes, especially during periods of heavy traffic, the reference=20=
> counting of the strings stored=A0in Session::m_sessionID might be=20
> updated wrongly as the above article explains. In these cases, the=20
> strings stored in Session::m_sessionID might be released and following=20=
> accesses will cause memory corruptions and crashes.
> =A0
> I'm going to protect all the simultaneous reads to shared=20
> std::string's with a mutex.
> =A0
> What do you think about?
> =A0
> Regards.
> Pasquale d'Aloise
> =A0
|