Subject: Re: [boost] Fixed bug in filesystem library ?
From: Peter Dimov (pdimov_at_[hidden])
Date: 2009-12-05 09:04:22
Luca Severini wrote:
> Hello everyone,
> I'm a newbie to boost libraries but I have some good experience in
> software development on Mac OS.
> Today I use downloaded and used boost for the first time. I use a
> MacBook Pro with Snow Leopard 10.6.2. The IDE is Xcode 3.2.1
> Writing some very basic code to learn how to use the filesystem
> library I got assertions (below) simply iterating recursilvely
> through a local directory to list its content.
> Boost_Test(57690) malloc: *** error for object 0xe518: pointer being
> freed was not allocated *** set a breakpoint in malloc_error_break to
std::string is broken in XCode 3.2.1. According to the collective
intelligence of the web, one reason is that its standard library has been
built with _GLIBCXX_FULLY_DYNAMIC_STRING defined, whereas the IDE by default
doesn't define it, leading to random crashes of the sort you report.
Others claim that there is a mismatch in the definitions of _GLIBCXX_DEBUG=1
_GLIBCXX_DEBUG_PEDANTIC=1 in a debug build; yet others report problems with
"Symbols Hidden by Default", although this may not be the cause of your
In your case, I'd first try the _GLIBCXX_FULLY_DYNAMIC_STRING define.
BTW, a std::string is never uninitialized. It's initialized to an empty
string by default.