Attaching a path.cpp file for reference.

On Tue, Aug 25, 2020 at 5:33 PM kamallochan Jena <kljena2050@gmail.com> wrote:
Hi All,

Thank you for your kind support!

In one of our applications, we are using Boost library and recently found an application crash because of the locale object return from below highlighted code from Boost source code (path.cpp). 

Boost library source code (File name: path.cpp and line No: 865) seems to return NULL locale object
image.png

As per call stack, Application is found to be crashed when std::use_facet() tried to Getfacet id from the passed locale object :
image.png
Please Note: At above line 934, path_locale() calls to the above default_locale()  which return an locale object with NULL value.

Can someone please answer the below queries:
     1>> In which scenario the code at std::locale(global_loc, new windows_file_codecvt);", mentioned above will return a locale object with NULL values ??

     2>> How to enable BOOST_ASSERT_MSG, so below code will execute  ??
           Example: BOOST_ASSERT_MSG(&path_locale(), "boost::filesystem::path locale initialization error");

     3>> In which conditions a locale object can be null ??

Thank you in Advance!!, please let me know if any further details are required on this issue.

Regards,
Kamal