Boost C++ Libraries: Ticket #3311: Unintentionally unthrown exceptions https://svn.boost.org/trac10/ticket/3311 <p> In several places, Boost.Iostreams creates exception objects but doesn't throw them, which I assume is unintentional, and appears to have the potential to result in incorrect behaviour. </p> <p> Using bad_seek() and bad_write() - </p> <p> <a class="ext-link" href="https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L163"><span class="icon">​</span>https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L163</a> <a class="ext-link" href="https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L184"><span class="icon">​</span>https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L184</a> <a class="ext-link" href="https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L188"><span class="icon">​</span>https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L188</a> <a class="ext-link" href="https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L275"><span class="icon">​</span>https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L275</a> <a class="ext-link" href="https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L296"><span class="icon">​</span>https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L296</a> <a class="ext-link" href="https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L300"><span class="icon">​</span>https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/detail/restrict_impl.hpp#L300</a> </p> <p> Using BOOST_IOSTREAMS_FAILURE() directly - </p> <p> <a class="ext-link" href="https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/stream_buffer.hpp#L103"><span class="icon">​</span>https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_39_0/boost/iostreams/stream_buffer.hpp#L103</a> </p> <p> These all seem to be present in trunk as well... </p> <p> The patch seems trivial; introduce "throw" in all these places... </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3311 Trac 1.4.3 Daniel James Thu, 12 Nov 2009 19:17:59 GMT <link>https://svn.boost.org/trac10/ticket/3311#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3311#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/57603" title="Fix unthrown exceptions. Refs #3311. Thanks to Gareth ...">[57603]</a>) Fix unthrown exceptions. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3311" title="#3311: Bugs: Unintentionally unthrown exceptions (closed: fixed)">#3311</a>. </p> <p> Thanks to Gareth Sylvester-Bradley and Richard Smith. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Sat, 02 Jan 2010 11:51:43 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3311#comment:2 https://svn.boost.org/trac10/ticket/3311#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/58633" title="Merge iostream fixes, mostly by Richard Smith. Fixes #3612, #3311, ...">[58633]</a>) Merge iostream fixes, mostly by Richard Smith. </p> <p> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3612" title="#3612: Bugs: Throwing heap-allocated exceptions (closed: fixed)">#3612</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3311" title="#3311: Bugs: Unintentionally unthrown exceptions (closed: fixed)">#3311</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2094" title="#2094: Bugs: iostreams fails to compile with -fno-exceptions (closed: fixed)">#2094</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3010" title="#3010: Bugs: Missing include guard in boost/iostreams/device/mapped_file.hpp (closed: fixed)">#3010</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2894" title="#2894: Bugs: Incorrect type for buffer_size and pback_size parameters (closed: fixed)">#2894</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3011" title="#3011: Bugs: code_converter doesn't support boost::ref( std::istream ) (closed: fixed)">#3011</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3352" title="#3352: Patches: CRC not correctly computed on x64 during decompression of gzip archive (closed: fixed)">#3352</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3505" title="#3505: Bugs: mapped_file windows handle validity check patch against 1.40.0 (closed: fixed)">#3505</a>. </p> Ticket