public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@gotplt.org>
To: gcc-patches@gcc.gnu.org
Cc: jakub@redhat.com
Subject: [ping3][PATCH 0/2] __bos and flex arrays
Date: Fri, 20 Jan 2023 14:38:03 -0500	[thread overview]
Message-ID: <5c51923c-8eb6-d6df-d909-d12125ff8c8e@gotplt.org> (raw)
In-Reply-To: <20221221222554.4141678-1-siddhesh@gotplt.org>

ping!

On 2022-12-21 17:25, Siddhesh Poyarekar wrote:
> Hi,
> 
> The first patch in the series is just a minor test cleanup that I did to
> make sure all tests in a test case run (instead of aborting at first
> failure) and print the ones that failed.  The second patch is the actual
> fix.
> 
> The patch intends to make __bos/__bdos do the right thing with structs
> containing flex arrays, either directly or within nested structs and
> unions.  This should improve minimum object size estimation in some
> cases and also bail out more consistently so that flex arrays don't
> cause false positives in fortification.
> 
> I've tested this with a bootstrap on x86_64 and also with
> --with-build-config=bootstrap-ubsan to make sure that there are no new
> failures due to this change.
> 
> Siddhesh Poyarekar (2):
>    testsuite: Run __bos tests to completion
>    tree-object-size: More consistent behaviour with flex arrays
> 
>   .../g++.dg/ext/builtin-object-size1.C         | 267 ++++++++--------
>   .../g++.dg/ext/builtin-object-size2.C         | 267 ++++++++--------
>   .../gcc.dg/builtin-dynamic-object-size-0.c    |  14 +-
>   gcc/testsuite/gcc.dg/builtin-object-size-1.c  | 263 ++++++++--------
>   gcc/testsuite/gcc.dg/builtin-object-size-12.c |  12 +-
>   gcc/testsuite/gcc.dg/builtin-object-size-13.c |  17 +-
>   gcc/testsuite/gcc.dg/builtin-object-size-15.c |  11 +-
>   gcc/testsuite/gcc.dg/builtin-object-size-2.c  | 287 +++++++++---------
>   gcc/testsuite/gcc.dg/builtin-object-size-3.c  | 263 ++++++++--------
>   gcc/testsuite/gcc.dg/builtin-object-size-4.c  | 267 ++++++++--------
>   gcc/testsuite/gcc.dg/builtin-object-size-6.c  | 267 ++++++++--------
>   gcc/testsuite/gcc.dg/builtin-object-size-7.c  |  52 ++--
>   gcc/testsuite/gcc.dg/builtin-object-size-8.c  |  17 +-
>   .../gcc.dg/builtin-object-size-common.h       |  12 +
>   .../gcc.dg/builtin-object-size-flex-common.h  |  90 ++++++
>   ...n-object-size-flex-nested-struct-nonzero.c |   6 +
>   ...ltin-object-size-flex-nested-struct-zero.c |   6 +
>   .../builtin-object-size-flex-nested-struct.c  |  22 ++
>   ...in-object-size-flex-nested-union-nonzero.c |   6 +
>   ...iltin-object-size-flex-nested-union-zero.c |   6 +
>   .../builtin-object-size-flex-nested-union.c   |  28 ++
>   .../gcc.dg/builtin-object-size-flex-nonzero.c |   6 +
>   .../gcc.dg/builtin-object-size-flex-zero.c    |   6 +
>   .../gcc.dg/builtin-object-size-flex.c         |  18 ++
>   gcc/testsuite/gcc.dg/pr101836.c               |  11 +-
>   gcc/testsuite/gcc.dg/strict-flex-array-3.c    |  11 +-
>   gcc/tree-object-size.cc                       | 150 ++++-----
>   27 files changed, 1275 insertions(+), 1107 deletions(-)
>   create mode 100644 gcc/testsuite/gcc.dg/builtin-object-size-common.h
>   create mode 100644 gcc/testsuite/gcc.dg/builtin-object-size-flex-common.h
>   create mode 100644 gcc/testsuite/gcc.dg/builtin-object-size-flex-nested-struct-nonzero.c
>   create mode 100644 gcc/testsuite/gcc.dg/builtin-object-size-flex-nested-struct-zero.c
>   create mode 100644 gcc/testsuite/gcc.dg/builtin-object-size-flex-nested-struct.c
>   create mode 100644 gcc/testsuite/gcc.dg/builtin-object-size-flex-nested-union-nonzero.c
>   create mode 100644 gcc/testsuite/gcc.dg/builtin-object-size-flex-nested-union-zero.c
>   create mode 100644 gcc/testsuite/gcc.dg/builtin-object-size-flex-nested-union.c
>   create mode 100644 gcc/testsuite/gcc.dg/builtin-object-size-flex-nonzero.c
>   create mode 100644 gcc/testsuite/gcc.dg/builtin-object-size-flex-zero.c
>   create mode 100644 gcc/testsuite/gcc.dg/builtin-object-size-flex.c
> 

      parent reply	other threads:[~2023-01-20 19:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-21 22:25 [PATCH " Siddhesh Poyarekar
2022-12-21 22:25 ` [PATCH 1/2] testsuite: Run __bos tests to completion Siddhesh Poyarekar
2023-01-31 12:33   ` Jakub Jelinek
2023-02-01 16:46     ` [committed v2] " Siddhesh Poyarekar
2022-12-21 22:25 ` [PATCH 2/2] tree-object-size: More consistent behaviour with flex arrays Siddhesh Poyarekar
2023-01-26 16:20   ` Qing Zhao
2023-01-26 17:16     ` Siddhesh Poyarekar
2023-01-26 17:42       ` Qing Zhao
2023-01-31 12:46   ` Jakub Jelinek
2023-01-31 13:01     ` Siddhesh Poyarekar
2023-01-03 14:30 ` [ping][PATCH 0/2] __bos and " Siddhesh Poyarekar
2023-01-11 13:14 ` [ping2][PATCH " Siddhesh Poyarekar
2023-01-20 19:38 ` Siddhesh Poyarekar [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=5c51923c-8eb6-d6df-d909-d12125ff8c8e@gotplt.org \
    --to=siddhesh@gotplt.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@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).