So, I recently started work on a large software project that links in several OSX static and dynamic libraries using the llvm-gcc compiler.
I have serious problems with stl. In particular, a very simple code will work. For example, in my main project, the following code fails:
{
std::vector< unsigned int > testvec;
testvec.resize( 1 );
testvec[0] = 0;
}
It crashes when it leaves the scope inside std :: vector <unsigned int> destructor, throwing SIGABRT and saying that the freed memory was not allocated. In particular:
malloc: *** error for object 0x135e8fc30: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
This only happens in release builds - debug builds work just fine.
, STL, , - .
nm , , stl- ( , std::vector < unsigned int > destructor S nm). , .
.a dylib, , STL?
[]
, libs, , ? , , ..:)