#3612 closed Bugs (fixed)
Throwing heap-allocated exceptions
Reported by: | 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)
Change History (3)
by , 13 years ago
Attachment: | boost_iostreams_throw_new.diff added |
---|
comment:1 by , 13 years ago
Note:
See TracTickets
for help on using tickets.
(In [57602]) Allocate exceptions on the stack, not the heap. Refs #3612, by Richard Smith.