From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5C15C3858293; Tue, 19 Jul 2022 14:51:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C15C3858293 From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug ada/29386] New: UBSan crash in gdb.ada/arrayptr.exp Date: Tue, 19 Jul 2022 14:51:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: ada X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simark at simark dot ca X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jul 2022 14:51:01 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29386 Bug ID: 29386 Summary: UBSan crash in gdb.ada/arrayptr.exp Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: ada Assignee: unassigned at sourceware dot org Reporter: simark at simark dot ca Target Milestone: --- On Ubuntu 22.04, with the `gnat-11` package installed (not `gnat`), I get: $ ./gdb -q --data-directory=3Ddata-directory -nx testsuite/outputs/gdb.ada/arrayptr/foo -ex "break foo.adb:40" Reading symbols from testsuite/outputs/gdb.ada/arrayptr/foo... /home/simark/src/binutils-gdb/gdb/dwarf2/read.c:17563:20: runtime error: sh= ift exponent 127 is too large for 64-bit type 'long unsigned int' It's this line in dwarf2/read.c: =E2=94=82 17562 negative_mask =3D=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 =E2=94=82 =E2=94=82 > 17563 -((ULONGEST) 1 << (TYPE_LENGTH (base_type) * TARGET= _CHAR_BIT - 1));=20=20=20=20 That crashes, while reading this DWARF: 0x00001a2e: DW_TAG_member DW_AT_name [DW_FORM_strp] ("OBJECT") DW_AT_decl_file [DW_FORM_data1]=20=20=20=20 ("/home/simark/src/binutils-gdb/gdb/testsuite/gdb.ada/arrayptr/foo.adb") DW_AT_decl_line [DW_FORM_data1] (33) DW_AT_decl_column [DW_FORM_data1] (0x09) DW_AT_type [DW_FORM_ref4] (0x00001a3c "foo__packed_array___XP7___XDLU_0__1180591620717411303423") DW_AT_bit_size [DW_FORM_data1] (0x46) DW_AT_data_bit_offset [DW_FORM_data1] (0x00) 0x00001a3c: DW_TAG_subrange_type DW_AT_lower_bound [DW_FORM_data1] (0x00) DW_AT_upper_bound [DW_FORM_data16]=20 (ffffffffffffffff3f00000000000000) DW_AT_name [DW_FORM_strp]=20=20 ("foo__packed_array___XP7___XDLU_0__1180591620717411303423") DW_AT_type [DW_FORM_ref4] (0x00001b1c "long_long_long_unsigned") DW_AT_GNAT_descriptive_type [DW_FORM_ref4] (0x00001a5a) DW_AT_artificial [DW_FORM_flag_present] (true) 0x00001b1c: DW_TAG_base_type DW_AT_byte_size [DW_FORM_data1] (0x10) DW_AT_encoding [DW_FORM_data1] (DW_ATE_unsigned) DW_AT_name [DW_FORM_strp] ("long_long_long_unsigned") DW_AT_artificial [DW_FORM_flag_present] (true) --=20 You are receiving this mail because: You are on the CC list for the bug.=