https://bugzilla.novell.com/show_bug.cgi?id=299959#c8
Philipp Thomas changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #8 from Philipp Thomas 2007-08-14 11:41:06 MST ---
With Dirks help I verified that this is reason:
While searching boosts bug tracking system, I found
http://svn.boost.org/trac/boost/ticket/1073 :
In operations.cpp, in the dir_itr_first function, there is a static std::string
called dummy_first_name. If the user attempts directory iteration from the
destructor of a global object, it fails because at that time the static
std::string is already destroyed.
The code in question:
BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
dir_itr_first( void *& handle, void *& buffer,
const std::string & dir, std::string & target,
file_status &, file_status & )
{
static const std::string dummy_first_name( "." );
if ( (handle = ::opendir( dir.c_str() )) == 0 ) return errno;
target = dummy_first_name;
std::size_t path_size;
fs::system_error_type ec = path_max( path_size );
if ( ec ) return ec;
dirent de;
buffer = std::malloc( (sizeof(dire))
+ path_size + 1 ); // + 1 for "/0"
return buffer == 0 ? ENOMEM : 0;
}
Making dummy_first_name non-static fixes it, as Dirk verified.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.