Subject: [Boost-bugs] [Boost C++ Libraries] #3295: throwing exception / assert in destructor
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-07-28 08:51:50
#3295: throwing exception / assert in destructor
-----------------------------------------+----------------------------------
Reporter: BDM <benoitdm@â¦> | Owner: igaztanaga
Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: interprocess
Version: Boost 1.38.0 | Severity: Problem
Keywords: exception assert destructor |
-----------------------------------------+----------------------------------
hello,
there is, I think, a bad use of exception in the destructor of
http://svn.boost.org/svn/boost/trunk/boost/interprocess/sync/posix/interprocess_mutex.hpp
I have learned a rule at school: "no exception must be thrown within a
destructor" (also see
https://www.securecoding.cert.org/confluence/display/cplusplus/ERR33-CPP.+Destructors+must+be
+exception-safe or http://www.parashift.com/c++-faq-
lite/exceptions.html#faq-17.3)
In the destructor of interprocess_mutex, an assert check for the good
destruction of the posix mutex, if it fails, it throws an exception ...
which is really bad in my case :) (even if I unlock the mutex just before
the destructor call)
Regards,
BDM.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3295> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC