From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BB6B238582A4; Thu, 9 Feb 2023 15:02:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB6B238582A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675954927; bh=rUOKQsKhJ912M+/YeURH/0KJkTK2EXjc2ZpATmdn/OU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LB2wbsvJjhspd8xVMh89zeNIi9X9v8J9EcldNe4LQOmlbXt2H8Lfe4BMObthX+Jc6 ori5CgTo/MFFO15L7fQX1XDCsGHNi8II3mGf7oKRh8ZTPasQo1bPlfLXwyZyQVhnnH 6yhgRhAFGFrp8GOXNXRqSxx2wJC0CcQnXgNN+79o= From: "cvs-commit at gcc dot gnu.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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29985 --- Comment #11 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom Tromey : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D1775f8b38047= 44c22611ed0c9fd2df4f5b4d8641 commit 1775f8b3804744c22611ed0c9fd2df4f5b4d8641 Author: Tom Tromey 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=3D29985 --=20 You are receiving this mail because: You are on the CC list for the bug.=