This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Dump function on internal errors
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Alexander Monakov <amonakov at ispras dot ru>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Andi Kleen <andi at firstfloor dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Andi Kleen <ak at linux dot intel dot com>
- Date: Mon, 29 May 2017 18:22:51 +0200
- Subject: Re: [PATCH] Dump function on internal errors
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D5683C049D57
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D5683C049D57
- References: <20170522141905.9112-1-andi@firstfloor.org> <CAFiYyc1SkD3XBj6xD9T1y3AcqSXzu0gYLk23es3i90GfgOa8hA@mail.gmail.com> <alpine.LNX.2.20.13.1705291907090.20167@monopod.intra.ispras.ru>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, May 29, 2017 at 07:15:33PM +0300, Alexander Monakov wrote:
> @@ -1063,6 +1064,17 @@ open_auxiliary_file (const char *ext)
> return file;
> }
>
> +/* Auxiliary callback for the diagnostics code. */
> +
> +static void
> +internal_error_function (diagnostic_context *context ATTRIBUTE_UNUSED,
> + const char *msgid ATTRIBUTE_UNUSED,
> + va_list *ap ATTRIBUTE_UNUSED)
> +{
> + warn_if_plugins ();
> + emergency_dump_function ();
What if there is another ICE during the dumping? Won't we then
end in endless recursion? Perhaps global_dc->internal_error should
be cleared here first?
Also, as none of the arguments are used and we are in C++,
perhaps it should be
static void
internal_error_function (diagnostic_context *, const char *, va_list *)
{
?
Jakub