Modify

Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#3612 closed Bugs (fixed)

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:

Description

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 danieljames

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

comment:2 Changed 7 years ago by danieljames

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

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

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

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain turkanis.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.