#169 stl port 5.2.0 & exceptions & crash


copy-paste from dev. forum follows:

Hello guys,

I recently upgraded from STLPort 5.0.2 to 5.2.0.
The result is that my program crashed in boost 1.33 on exception handling.

Digging further, I found out that __Named_exception class is a culprit.
__Named_exception class was changed to contain dynamically allocated char * member.

So copy constructor and assignment operators generated by the compiler are not going to do their job right any more.
I think that __Named_exception has to implement copy ctor and assignment operators to support for exceptions when they are passed to catch() by value:

Consider the following code from e.g.

struct bad_month : public std::out_of_range
bad_month() : std::out_of_range(
std::string("Month number is out of range 1..12")){}

try {
throw bad_month();
catch(out_of_range ex) { //ups! correct copy ctor must be called here!

just in case, my compiler is MS VC 8.1. But I don't think it matters.


RE: stl port 5.2.0 & exceptions & crash (New)
By: Francois Dumont (dums) - 2008-03-06 12:45
You are perfectly right, thanks for reporting this issue before 5.2 gets released. It would be great if you could create a bug entry in our bug tracking system.



  • Francois Dumont

    Francois Dumont - 2008-03-06
    • priority: 5 --> 7
    • assigned_to: nobody --> dums
    • status: open --> open-accepted
  • Francois Dumont

    Francois Dumont - 2008-03-08

    Logged In: YES
    Originator: NO

    Fixed in SVN trunk.

    Thanks again !

  • Francois Dumont

    Francois Dumont - 2008-03-08
    • status: open-accepted --> closed-fixed

Log in to post a comment.