From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: Szabolcs Nagy <Szabolcs.Nagy@arm.com>
Cc: "tromey@sourceware.org" <tromey@sourceware.org>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
nd <nd@arm.com>
Subject: Re: [pushed] Add static_asserts for the sizes of space-critical structs
Date: Wed, 13 Nov 2019 20:06:00 -0000 [thread overview]
Message-ID: <CAPTJ0XEMzFJFxH_9X046d4R1eMHvCZHePS0om=T_-OZSTwx6cA@mail.gmail.com> (raw)
In-Reply-To: <ee48d5f2-9627-a989-bf3f-e80a7d83ee78@arm.com>
On Wed, Nov 13, 2019 at 1:47 AM Szabolcs Nagy <Szabolcs.Nagy@arm.com> wrote:
>
> On 04/11/2019 18:14, Sourceware to Gerrit sync (Code Review) wrote:
> > Sourceware to Gerrit sync has submitted this change.
> >
> > Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/306
> > ......................................................................
> >
> > Add static_asserts for the sizes of space-critical structs
> >
> > Specifically the three structs mentioned in symtab.h:
> > - general_symbol_info
> > - symbol
> > - partial_symbol
> >
> > This ensures that those structs won't accidentally get bigger.
> >
> > gdb/ChangeLog:
> >
> > 2019-11-04 Christian Biesinger <cbiesinger@google.com>
> >
> > * psympriv.h: Add static_asserts for sizeof (general_symbol_info)
> > and sizeof (symbol).
> > * symtab.h: Add a static_assert for sizeof (partial_symbol).
> >
> > Change-Id: Idd68320aa3e79ee7cc749019724636a58ce4b9c6
>
> armhf build fails since this commit:
>
> https://gdb-buildbot.osci.io/#/builders/29/builds/650
Tromey's patch at
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/611 will fix
this.
Christian
>
> gdb/symtab.h:453:6: error: static assertion failed
> 452 | gdb_static_assert ((sizeof (void *) == 8 && sizeof (general_symbol_info) == 32)
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 453 | || (sizeof (void *) == 4
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> 454 | && sizeof (general_symbol_info) == 20));
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next prev parent reply other threads:[~2019-11-13 20:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-25 18:42 [review] " Christian Biesinger (Code Review)
2019-10-29 19:22 ` [review v2] " Tom Tromey (Code Review)
2019-11-04 17:43 ` [review v3] " Christian Biesinger (Code Review)
2019-11-04 17:44 ` [review v4] " Christian Biesinger (Code Review)
2019-11-04 17:56 ` Tom Tromey (Code Review)
2019-11-04 18:14 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2019-11-13 9:47 ` Szabolcs Nagy
2019-11-13 20:06 ` Christian Biesinger via gdb-patches [this message]
2019-11-04 18:14 ` Sourceware to Gerrit sync (Code Review)
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='CAPTJ0XEMzFJFxH_9X046d4R1eMHvCZHePS0om=T_-OZSTwx6cA@mail.gmail.com' \
--to=gdb-patches@sourceware.org \
--cc=Szabolcs.Nagy@arm.com \
--cc=cbiesinger@google.com \
--cc=nd@arm.com \
--cc=tromey@sourceware.org \
/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