[Urgent request] : Boost default_locale() is causing an application crash!

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Urgent request] : Boost default_locale() is causing an application crash!

Boost - Users mailing list
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

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent request] : Boost default_locale() is causing an application crash!

Boost - Users mailing list
Attaching a path.cpp file for reference.

On Tue, Aug 25, 2020 at 5:33 PM kamallochan Jena <[hidden email]> 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

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

path.cpp (41K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent request] : Boost default_locale() is causing an application crash!

Boost - Users mailing list
In reply to this post by Boost - Users mailing list

On Tue, 25 Aug 2020 at 14:04, kamallochan Jena via Boost-users <[hidden email]> wrote:
Hi All,

Thank you for your kind support!

Please, refrain from overusing 'urgent' tag.
Nobody here cares about your work priorities and schedules.

Best regards,
--

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent request] : Boost default_locale() is causing an application crash!

Boost - Users mailing list
Thank you  Mateusz Loskot!

Sure will take care of it and also in future too.

Regards,
Kamal

On Tue, Aug 25, 2020 at 6:14 PM Mateusz Loskot via Boost-users <[hidden email]> wrote:

On Tue, 25 Aug 2020 at 14:04, kamallochan Jena via Boost-users <[hidden email]> wrote:
Hi All,

Thank you for your kind support!

Please, refrain from overusing 'urgent' tag.
Nobody here cares about your work priorities and schedules.

Best regards,
--
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent request] : Boost default_locale() is causing an application crash!

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
May I know which compiler are you using?

On Sat, Aug 29, 2020 at 10:33 AM kamallochan Jena via Boost-users <[hidden email]> wrote:
Attaching a path.cpp file for reference.

On Tue, Aug 25, 2020 at 5:33 PM kamallochan Jena <[hidden email]> 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
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users


--
Juan
:wq


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users