Repository: activemq-cpp Updated Branches: refs/heads/3.9.x 50d9c7f8a -> 215da1d94
https://issues.apache.org/jira/browse/AMQCPP-587 Clone the exception being passed to XAException as the cause exception to avoid a seg fault due to trying to delete a pointer to a reference. (cherry picked from commit b61e95c47970f9ab946928674d9da35752f29413) Project: http://git-wip-us.apache.org/repos/asf/activemq-cpp/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-cpp/commit/215da1d9 Tree: http://git-wip-us.apache.org/repos/asf/activemq-cpp/tree/215da1d9 Diff: http://git-wip-us.apache.org/repos/asf/activemq-cpp/diff/215da1d9 Branch: refs/heads/3.9.x Commit: 215da1d940c32f47313196b398339fad5d271b99 Parents: 50d9c7f Author: Timothy Bish <tabish...@gmail.com> Authored: Mon Nov 23 12:15:55 2015 -0500 Committer: Timothy Bish <tabish...@gmail.com> Committed: Mon Nov 23 12:22:26 2015 -0500 ---------------------------------------------------------------------- activemq-cpp/src/main/activemq/core/ActiveMQTransactionContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/215da1d9/activemq-cpp/src/main/activemq/core/ActiveMQTransactionContext.cpp ---------------------------------------------------------------------- diff --git a/activemq-cpp/src/main/activemq/core/ActiveMQTransactionContext.cpp b/activemq-cpp/src/main/activemq/core/ActiveMQTransactionContext.cpp index dbd81b3..06b7175 100644 --- a/activemq-cpp/src/main/activemq/core/ActiveMQTransactionContext.cpp +++ b/activemq-cpp/src/main/activemq/core/ActiveMQTransactionContext.cpp @@ -747,7 +747,7 @@ std::string ActiveMQTransactionContext::getResourceManagerId() const { //////////////////////////////////////////////////////////////////////////////// XAException ActiveMQTransactionContext::toXAException(decaf::lang::Exception& ex) { CMSException cmsEx = CMSExceptionSupport::create(ex); - XAException xae(ex.getMessage(), &cmsEx); + XAException xae(ex.getMessage(), cmsEx.clone()); xae.setErrorCode(XAException::XAER_RMFAIL); return xae; }