boost.filesystem create_directories выбрасывает std :: bad_alloc

У меня есть приложение Visual Studio 2008 C ++ 03 с использованием Boost 1.47.0, работающее в Windows XP SP3.

Вызовboost::filesystem::create_directories( L"c:\\foo\\bar" ); бросаетstd::bad_alloc исключение.

В окне вывода я вижу сообщение кучи отладки: & quot; HEAP [test.exe]: Неверный размер выделения - CDCDCDCE (превышен 7ffdefff) & quot;

Вызов callstack показывает, что boost.filesystem создает новую локаль и последнюю видимую строку кода в строке 309 файла стандартной библиотеки Microsoft xlocale.

msvcp90.dll!std::_Allocate<char>()  + 0x17 bytes    
msvcp90.dll!std::allocator<char>::allocate()  + 0xf bytes    
msvcp90.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Copy()  + 0x70 bytes    
msvcp90.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Grow()  + 0x26 bytes    
msvcp90.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign()  + 0x50 bytes    
msvcp90.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string<char,std::char_traits<char>,std::allocator<char> >()  + 0x24 bytes    
msvcp90.dll!std::locale::_Locimp::_Locimp()  + 0x47 bytes    
> test.exe!std::locale::locale<windows_file_codecvt>(const std::locale & _Loc={...}, const windows_file_codecvt * _Facptr=0x00b48f60)  Line 309 + 0x69 bytes    C++
test.exe!`anonymous namespace'::default_locale()  Line 735    C++
test.exe!`anonymous namespace'::path_locale()  Line 777 + 0x2a bytes    C++
test.exe!boost::filesystem3::path::wchar_t_codecvt_facet()  Line 797 + 0x25 bytes    C++
test.exe!boost::filesystem3::path::codecvt()  Line 388 + 0x5 bytes    C++
test.exe!boost::filesystem3::path::path<wchar_t const *>(const wchar_t * begin=0x00b460f8, const wchar_t * end=0x00b46116)  Line 162 + 0x5 bytes    C++
test.exe!boost::filesystem3::path::parent_path()  Line 313 + 0x57 bytes    C++
test.exe!boost::filesystem3::detail::create_directories(const boost::filesystem3::path & p={...}, boost::system::error_code * ec=0x00000000)  Line 832 + 0x13 bytes    C++
test.exe!boost::filesystem3::create_directories(const boost::filesystem3::path & p={...})  Line 318 + 0x29 bytes    C++
test.exe!wmain(int __formal=1, int __formal=1)  Line 112 + 0xc bytes    C++
test.exe!__tmainCRTStartup()  Line 583 + 0x19 bytes    C
test.exe!wmainCRTStartup()  Line 403    C
kernel32.dll!_BaseProcessStart@4()  + 0x23 bytes    

Кто-нибудь может подсказать, как решить эту проблему?

EDIT Я обновился до версии 1.50.0. Вопрос остается.

Ответы на вопрос(2)

Ваш ответ на вопрос