Ticket #3612 (closed Bugs: fixed)

Opened 8 years ago

Last modified 7 years ago

Throwing heap-allocated exceptions

Reported by: Richard Smith <richard@…> Owned by: turkanis
Milestone: Boost 1.41.0 Component: iostreams
Version: Boost 1.40.0 Severity: Problem
Keywords: Cc:


In four places in <boost/iostreams/device/mapped_file.hpp> heap-allocated exceptions are thrown, e.g.:

throw new BOOST_IOSTREAMS_FAILURE("invalid flags");

These should almost certainly be stack-allocated as elsewhere in Boost.IOStreams.

Patch attached.


boost_iostreams_throw_new.diff (1.2 KB) - added by Richard Smith <richard@…> 8 years ago.

Change History

Changed 8 years ago by Richard Smith <richard@…>

comment:1 Changed 8 years ago by danieljames

(In [57602]) Allocate exceptions on the stack, not the heap. Refs #3612, by Richard Smith.

comment:2 Changed 7 years ago by danieljames

  • Status changed from new to closed
  • Resolution set to fixed

(In [58633]) Merge iostream fixes, mostly by Richard Smith.

Fixes #3612, #3311, #2094, #3010, #2894, #3011, #3352, #3505.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.