Modify

Ticket #3612 (closed Bugs: fixed)

Opened 4 years ago

Last modified 4 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:

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

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

Change History

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

comment:1 Changed 4 years ago by danieljames

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

comment:2 Changed 4 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.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
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.