Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2932: iostreams file_descriptor: possible throw of exception in call to destructor
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-07-30 08:41:45
#2932: iostreams file_descriptor: possible throw of exception in call to
destructor
--------------------------------------------+-------------------------------
Reporter: Robert Hunger <rhunger@â¦> | Owner: turkanis
Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: iostreams
Version: Boost Development Trunk | Severity: Showstopper
Keywords: |
--------------------------------------------+-------------------------------
Changes (by Gareth Sylvester-Bradley <gareth.sylvester-bradley@â¦>):
* cc: gareth.sylvester-bradley@⦠(added)
* severity: Problem => Showstopper
* milestone: Boost 1.39.0 => Boost 1.40.0
Comment:
> IMHO throwing exceptions in destructors should be avoided.
I'd put it stronger than that! This just bit my product for real, causing
a std::terminate() due to an exception from this destructor during stack
unwinding for another exception (in fact a "bad close" from an explicit
call to close() on the same stream).
FWIW, I was using the 1.39.0 release, where the problem is present here -
https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/device/file_descriptor.hpp#L89
{{{
~impl()
{ if (flags_ & close_on_exit) close_impl(*this); }
}}}
IMHO, this needs to be patched ASAP.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/2932#comment:1> 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