public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug c++/29985] gdbtypes.h:985: internal-error: field: Assertion `idx >= 0 && idx < num_fields ()' failed.
Date: Thu, 09 Feb 2023 15:02:07 +0000	[thread overview]
Message-ID: <bug-29985-4717-MTfINxupIu@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29985-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29985

--- Comment #11 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1775f8b3804744c22611ed0c9fd2df4f5b4d8641

commit 1775f8b3804744c22611ed0c9fd2df4f5b4d8641
Author: Tom Tromey <tromey@adacore.com>
Date:   Wed Jan 11 12:42:40 2023 -0700

    Increase size of main_type::nfields

    main_type::nfields is a 'short', and has been for many years.  PR
    c++/29985 points out that 'short' is too narrow for an enum that
    contains more than 2^15 constants.

    This patch bumps the size of 'nfields'.  To verify that the field
    isn't directly used, it is also renamed.  Note that this does not
    affect the size of main_type on x86-64 Fedora 36.  And, if it does
    have a negative effect somewhere, it's worth considering that types
    could be shrunk more drastically by using subclasses for the different
    codes.

    This is v2 of this patch, which has these changes:

    * I changed nfields to 'unsigned', per Simon's request.  I looked at
      changing all the uses, but this quickly fans out into a very large
      patch.  (One additional tweak was needed, though.)

    * I wrote a test case.  I discovered that GCC cannot compile a large
      enough C test case, so I resorted to using the DWARF assembler.
      This test doesn't reproduce the crash, but it does fail without the
      patch.

    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29985

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-02-09 15:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 21:41 [Bug c++/29985] New: " pawel_sikora at zoho dot com
2023-01-10 21:42 ` [Bug c++/29985] " pawel_sikora at zoho dot com
2023-01-10 21:46 ` pawel_sikora at zoho dot com
2023-01-11 18:42 ` tromey at sourceware dot org
2023-01-11 19:33 ` pedro at palves dot net
2023-01-11 19:48 ` pawel_sikora at zoho dot com
2023-01-11 20:44 ` tromey at sourceware dot org
2023-01-11 20:45 ` tromey at sourceware dot org
2023-01-27 15:16 ` tromey at sourceware dot org
2023-01-27 17:06 ` pedro at palves dot net
2023-01-30 20:09 ` tromey at sourceware dot org
2023-02-04 16:52 ` pawel_sikora at zoho dot com
2023-02-09 15:02 ` cvs-commit at gcc dot gnu.org [this message]
2023-02-09 15:02 ` tromey at sourceware dot org
2023-03-15 18:23 ` simon.marchi at polymtl dot ca

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=bug-29985-4717-MTfINxupIu@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).