Boost C++ Libraries: Ticket #6834: Memory corruption when calling boost::filesystem::exists() from static initializer with Unicode paths https://svn.boost.org/trac10/ticket/6834 <p> Assume we have a class <a class="missing wiki">MyClass</a> with the constructor as shown below. Now, if we create a static instance of <a class="missing wiki">MyClass</a> (or have some other mechanism to execute this code at static initialization time), then this code will create an access violation exception when exists() is called. </p> <pre class="wiki">MyClass::MyClass() { boost::filesystem::path path(L"C:\\Windows"); path /= boost::filesystem::path(L"notepad.exe"); if (!boost::filesystem::exists(path)) { std::cout &lt;&lt; "notepad.exe doesn't exist!" &lt;&lt; std::endl; } } </pre><p> The code was tested on Windows 7 X64 SP1 with VS 2008 SP1 with boost 1.49. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6834 Trac 1.4.3