Boost C++ Libraries: Ticket #3612: Throwing heap-allocated exceptions https://svn.boost.org/trac10/ticket/3612 <p> In four places in &lt;boost/iostreams/device/mapped_file.hpp&gt; heap-allocated exceptions are thrown, e.g.: </p> <blockquote> <p> throw new BOOST_IOSTREAMS_FAILURE("invalid flags"); </p> </blockquote> <p> These should almost certainly be stack-allocated as elsewhere in Boost.IOStreams. </p> <p> Patch attached. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3612 Trac 1.4.3 Richard Smith <richard@…> Wed, 11 Nov 2009 23:18:36 GMT attachment set https://svn.boost.org/trac10/ticket/3612 https://svn.boost.org/trac10/ticket/3612 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_iostreams_throw_new.diff</span> </li> </ul> Ticket Daniel James Thu, 12 Nov 2009 19:17:27 GMT <link>https://svn.boost.org/trac10/ticket/3612#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3612#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/57602" title="Allocate exceptions on the stack, not the heap. Refs #3612, by Richard ...">[57602]</a>) Allocate exceptions on the stack, not the heap. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3612" title="#3612: Bugs: Throwing heap-allocated exceptions (closed: fixed)">#3612</a>, by 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/3612#comment:2 https://svn.boost.org/trac10/ticket/3612#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