activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Mittler (JIRA)" <>
Subject [jira] Closed: (AMQCPP-61) CMSException::what returns c_str of temporary std::string
Date Mon, 29 Jan 2007 12:48:04 GMT


Nathan Mittler closed AMQCPP-61.

    Resolution: Fixed

fixed in trunk

> CMSException::what returns c_str of temporary std::string
> ---------------------------------------------------------
>                 Key: AMQCPP-61
>                 URL:
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 2.0
>            Reporter: Albert Strasheim
>         Assigned To: Nathan Mittler
>            Priority: Minor
>             Fix For: 2.0
> In my debugging to figure out what's going on with AMQCPP-59, I'm sometimes seeing invalid
stuff getting printed out when I do printStackTrace on some exceptions. I think this might
be because CMSException::what returns getMessage().c_str(), i.e. it seems to be returning
the c_str of a std::string that is allocated on the stack, since getMessage returns std::string.
> An example of where what() is being called that seems to be causing problems is on line
84 of ActiveMQConsumer.cpp. When I catch this exception later on and print its stack trace
or call its getMessage, I get garbage.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message