www.digitalmars.com         C & C++   DMDScript  

c++.stl.port - STL debug locking on vector.clear

Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Greetings,

When using stl debug mode (building with _STLP_DEBUG defined), calling 
the std::vector::clear() method causes the program to freeze. I have 
examined it under the debugger and the culprit is what seems to be some 
thread synchronization code in \dm\stlport\stlport\stl\_threads.c: the 
loop on line 131 that expects _Atomic_swap to return zero, never ends. 
No such problem occurs with release or normal debug build.
The small program I have attached as an example keeps locking when built 
with _STLP_DEBUG defined.
Any fixes/workarounds to get working stl debug?

Best regards,
Dimitri
Sep 19 2004