public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Sebor <msebor@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>, Jeff Law <law@redhat.com>,
	gcc-patches@gcc.gnu.org,
	Tobias Burnus <tobias.burnus@physik.fu-berlin.de>
Subject: Re: [PING 2] [PATCH] enhance buffer overflow warnings (and c/53562)
Date: Wed, 16 Nov 2016 15:58:00 -0000	[thread overview]
Message-ID: <eb6b16db-8dfe-f369-82ef-4f707dbf2053@gmail.com> (raw)
In-Reply-To: <e4905696-7a82-9354-908b-56b37f476bbf@gmail.com>

I'm still looking for a review of the patch below, first posted
on 10/28 and last updated/pinged last Wednesday:

   https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00896.html

Thanks

On 11/09/2016 03:49 PM, Martin Sebor wrote:
> The attached minor update to the patch also resolves bug 77784 that
> points out that -Wformat-length issues a warning also issued during
> the expansion of some of the __builtin___sprintf_chk intrinsics.
>
> Martin
>
> On 11/04/2016 02:16 PM, Martin Sebor wrote:
>> Attached is an update to the patch that takes into consideration
>> the feedback I got.  It goes back to adding just one option,
>> -Wstringop-overflow, as in the original, while keeping the Object
>> Size type as an argument.  It uses type-1 as the default setting
>> for string functions (strcpy et al.) and, unconditionally, type-0
>> for raw memory functions (memcpy, etc.)
>>
>> I retested Binutils 2.27 and the Linux kernel again with this patch
>> and also added Glibc, and it doesn't complain about anything (both
>> Binutils and the kernel also build cleanly with an unpatched GCC
>> with_FORTIFY_SOURCE=2 or its rough equivalent for the kernel).
>> The emit-rtl.c warning (bug 78174) has also been suppressed by
>> the change to bos type-0 for memcpy.
>>
>> While the patch doesn't trigger any false positives (AFAIK) it is
>> subject to a fair number of false negatives due to the limitations
>> of the tree-object-size pass, and due to transformations done by
>> other passes that prevent it from detecting some otherwise obvious
>> overflows.  Although unfortunate, I believe the warnings that are
>> emitted are useful as the first line of defense in software that
>> doesn't use _FORTIFY_SOURCE (such as GCC itself).   And this can
>> of course be improved if some of the limitations are removed over
>> time.
>>
>> Martin
>

  reply	other threads:[~2016-11-16 15:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-28  2:19 Martin Sebor
2016-10-30 22:45 ` Martin Sebor
2016-10-31 12:39   ` Tobias Burnus
2016-10-31 16:44     ` Martin Sebor
2016-11-01  2:39       ` Martin Sebor
2016-11-01 14:10         ` Jakub Jelinek
2016-11-01 19:12           ` Jeff Law
2016-11-01 19:14             ` Jakub Jelinek
2016-11-02  2:55               ` Martin Sebor
2016-11-02  7:38                 ` Jakub Jelinek
2016-11-02 15:46                   ` Martin Sebor
2016-11-02 16:55                     ` Martin Sebor
2016-11-02 19:32                       ` Jakub Jelinek
2016-11-04 20:16                         ` Martin Sebor
2016-11-09 22:50                           ` [PING] " Martin Sebor
2016-11-16 15:58                             ` Martin Sebor [this message]
2016-11-22  0:18                               ` Ping 3 " Martin Sebor
2016-12-06  4:04                                 ` Ping 4 " Martin Sebor
2016-12-07 19:42                             ` [PING] " Jeff Law
2016-12-08  0:20                               ` Martin Sebor
2016-11-07  0:50                         ` Martin Sebor
2016-11-16 18:10                         ` Jeff Law

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=eb6b16db-8dfe-f369-82ef-4f707dbf2053@gmail.com \
    --to=msebor@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=law@redhat.com \
    --cc=tobias.burnus@physik.fu-berlin.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).