Boost logo

Boost :

Subject: [boost] heap corruption on windows due to windows_file_codecvt
From: Pedro Larroy (pedro.larroy.lists_at_[hidden])
Date: 2012-09-27 13:45:20


Hi

When using debug mode in windows with boost_filesystem there's "Debug
Assertion Failed!" in _CtrIsValidHeapPointer

When operator new is redefined it causes windows_file_codecvt not to
be released with the matching release that it allocated it.

We reported this to Microsoft as seems it's a bug in their STL. But so
far, I tried with VS2012 and the bug seems not fixed...

There's a workraround in boost that we are using for the moment:

This has to be changed in path.cpp to fix it:

- std::locale loc(global_loc, new windows_file_codecvt);
+ std::locale loc(global_loc, _NEW_CRT windows_file_codecvt);

Should this fix be applied in boost until is fixed on Microsoft's side?

This is a very nasty issue that will happen only with a redefined
operator new. (For example we are using new with the sacalable
allocator of tbb).

Regards.

Pedro.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk