From: Paul Richard Thomas <paul.richard.thomas@gmail.com>
To: "Tobias Schlüter" <tobias.schlueter@physik.uni-muenchen.de>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
Fortran List <fortran@gcc.gnu.org>
Subject: Re: Ping: [PATCH] Install error handler for out-of-memory when using STL containers
Date: Mon, 29 Oct 2012 09:48:00 -0000 [thread overview]
Message-ID: <CAGkQGi+22khbMCcfY8ePy3vsrysp-WZBNo6AJJBDkYz4cE3fxw@mail.gmail.com> (raw)
In-Reply-To: <508D4F1F.6040301@physik.uni-muenchen.de>
Hi Tobi,
It looks straightforward to me but I am not convinced that a fortran
maintainer should be giving the green light on this :-)
Cheers
Paul
On 28 October 2012 16:28, Tobias Schlüter
<tobias.schlueter@physik.uni-muenchen.de> wrote:
>
> Ping. This issue stands in the way of a very simple solution of PR
> fortran/51727. I've re-attached the patch for your convenience.
>
> On 15 Oct 2012 at 22:51:05 +0200 Tobias Schlüter wrote:
>>
>> The attached patch adds out-of-memory diagnostics for code using STL
>> containers by using set_new_handler. Since the intended allocation
>> size is not available to a new_handler, I had to forego a more
>> detailed error message such as the one from xmalloc_failed().
>> fatal_error() and abort() don't give a meaningful location when the
>> new_handler is called, so I chose to put together the error message
>> manually as is done in xmalloc_failed(). I would have found it more
>> appealing to have operator new call xmalloc() unless a custom
>> allocator is given, but I don't think there's a standard way of doing
>> this.
>>
>> Built and tested on the C and Fortran testsuites. Ok for trunk?
>
>
> Best regards,
> - Tobi
>
> 2012-10-15 Tobias Schlüter <tobi@gcc.gnu.org>
>
> * toplev.c: Add '#include <new>'.
> (cxx_out_of_memory): New function.
> (general_init): Install cxx_out_of_memory as handler for
> out-of-memory condition.
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy
next prev parent reply other threads:[~2012-10-29 9:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-13 13:41 PR fortran/51727: make module files reproducible, question on C++ in gcc Tobias Schlüter
2012-10-13 13:51 ` Tobias Schlüter
2012-10-13 18:21 ` Diego Novillo
2012-10-13 18:23 ` Tobias Schlüter
2012-10-13 18:23 ` Diego Novillo
2012-10-13 22:48 ` Joseph S. Myers
2012-10-14 22:37 ` Janne Blomqvist
2012-10-15 0:31 ` Jakub Jelinek
2012-10-15 12:54 ` Tobias Schlüter
2012-10-15 17:58 ` Tobias Schlüter
2012-10-15 21:06 ` [PATCH] Install error handler for out-of-memory when using STL containers " Tobias Schlüter
2012-10-28 15:50 ` Ping: [PATCH] Install error handler for out-of-memory when using STL containers Tobias Schlüter
2012-10-29 9:48 ` Paul Richard Thomas [this message]
2012-10-29 17:38 ` Mike Stump
2012-11-03 9:17 ` Ping**2: " Tobias Schlüter
2012-10-15 13:12 ` PR fortran/51727: make module files reproducible, question on C++ in gcc Tobias Schlüter
2012-11-08 19:02 ` Tobias Schlüter
2012-11-29 10:40 ` Tobias Schlüter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGkQGi+22khbMCcfY8ePy3vsrysp-WZBNo6AJJBDkYz4cE3fxw@mail.gmail.com \
--to=paul.richard.thomas@gmail.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=tobias.schlueter@physik.uni-muenchen.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).