public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: libc-hacker@sources.redhat.com
Subject: Re: symbol bloat for fortify warnings
Date: Tue, 01 Mar 2005 00:22:00 -0000	[thread overview]
Message-ID: <200503010022.j210Mlic012505@magilla.sf.frob.com> (raw)
In-Reply-To: Ulrich Drepper's message of  Monday, 28 February 2005 16:02:37 -0800 <4223B11D.2030404@redhat.com>

> This nop function will work for this special case, and I agree, it
> should be used.

Ok.  

> But it is no general solution.  For instance, there is a related test
> which I have not yet implemented.  If the second memset parameter is >
> 255, the called function cannot be a no-op and should not be in
> libc_nonshared.

I really don't see a problem with having this produce a no-op call for the
warning, plus the normal memset call.  In fact, I think it's preferable to
make it:

__builtin_constant_p (ch) && (ch) > 255
? (__warn_memset_ch_overflows (), __builtin_memset ((dest), (ch), (len))) : ...

so that the compiler might still choose to inline the memset (and if not it
will generate the normal "memset" call directly).  In the current
implementation, that will produce one useless call+ret for the warning
stub.  But that is only a temporary situation until we have the compiler
support to emit the warning directly without any call in the assembly emitted.


Thanks,
Roland

      reply	other threads:[~2005-03-01  0:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-25  2:47 Roland McGrath
2005-03-01  0:03 ` Ulrich Drepper
2005-03-01  0:22   ` Roland McGrath [this message]

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=200503010022.j210Mlic012505@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=drepper@redhat.com \
    --cc=libc-hacker@sources.redhat.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).