public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: Teresa Johnson <tejohnson@google.com>
Cc: Jan Hubicka <hubicka@ucw.cz>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	David Li <davidxl@google.com>
Subject: Re: [Patch] Avoid gcc_assert in libgcov
Date: Thu, 16 Jan 2014 04:39:00 -0000	[thread overview]
Message-ID: <20140116043923.GA22909@kam.mff.cuni.cz> (raw)
In-Reply-To: <CAAe5K+V2zQ=mcZKvYPj+Q2BEMhvYQyibtu1-KfkzdnQf_ZZvZg@mail.gmail.com>

> 
> In that case should we call gcov_error when IN_LIBGCOV? One
> possibility would be to simply make gcov_nonruntime_assert be defined
> as if (!EXPR) gcov_error in the IN_LIBGCOV case. But I think what you
> wanted here was to reduce libgcov bloat by removing calls altogether,
> which this wouldn't solve. But if we want to call gcov_error in some
> cases, I think I need to add another macro that will either do
> gcc_assert when !IN_LIBGCOV and "if (!EXPR) gcov_error" when
> IN_LIBGCOV. Is that what you had in mind?

I think for errors that can be triggered by data corruption, we ought to
produce resonable error messages in both IN_LIBGCOV or for offline tools.
Just unwound sequence if(...) gcov_error seems fine to me in this case,
but we may also have assert like wrapper.
I see we do not provide gcov_error outside libgcov, we probably ought to map
it to fatal_error in GCC binary.

thanks,
Honza

  reply	other threads:[~2014-01-16  4:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 14:33 Teresa Johnson
2014-01-09 14:56 ` Jan Hubicka
2014-01-14 20:01   ` Teresa Johnson
2014-01-16  4:39     ` Jan Hubicka [this message]
2014-01-16 22:35       ` Teresa Johnson
2014-01-16 22:41         ` Jan Hubicka
2014-05-22 14:09           ` Teresa Johnson
2014-05-22 21:30             ` Rong Xu

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=20140116043923.GA22909@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=davidxl@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tejohnson@google.com \
    /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).