Opened 13 years ago

Closed 13 years ago

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

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@…> 13 years ago.

Download all attachments as: .zip

Change History (3)

by Richard Smith <richard@…>, 13 years ago

comment:1 by Daniel James, 13 years ago

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

comment:2 by Daniel James, 13 years ago

Resolution: fixed
Status: newclosed

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

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

Note: See TracTickets for help on using tickets.