Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3612 closed Bugs (fixed)

Throwing heap-allocated exceptions

Reported by: Richard Smith <richard@…> Owned by: Jonathan 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.

Attachments (1)

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

Download all attachments as: .zip

Change History (3)

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

comment:1 Changed 8 years ago by Daniel James

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

comment:2 Changed 8 years ago by Daniel James

Resolution: fixed
Status: newclosed

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

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

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jonathan Turkanis.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.