From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B45A43858434; Thu, 18 May 2023 14:04:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B45A43858434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684418694; bh=9Mi9hfzgRpmDIQ3fAmLrPfZ98eEEtQ/Gfy+sg76+T0w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Dnv9MA5aUXU9jfXVSWbxXGrAtXl3UU6Kt3re1BeZdZE75NpT1p/NZQ1bS+LwPjuyh dhslObeg+PKdYRO0losCHCEdW4XBNFmzpnXyndGd7WOvNDRFYeBjNlygZoStqAiTGv An0D2tKS14CpUDq1U6FIlWTA81xLBt2AL99ZL+LE= From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug record/30455] Debuggee with sanitizer causes: Assertion `regnum < gdbarch_num_regs (arch ())' failed. Date: Thu, 18 May 2023 14:04:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: record X-Bugzilla-Version: 13.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org 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: cf_reconfirmed_on bug_status everconfirmed 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=3D30455 Tom Tromey changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-05-18 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Tom Tromey --- Here: record_full_arch_list_add_reg (ir.regcache, I387_MM0_REGNUM (tdep) + ir.reg); break; it's recording register 97. But: 325 gdb_assert (regnum < gdbarch_num_regs (arch ())); (top) p gdbarch_num_regs(arch()) $10 =3D 73 So it's some confusion either in the regcache code or in i386-tdep.c. Here's the relevant parts of the stack trace: #9 0x000000000103df82 in internal_error_loc (file=3D,=20 line=3D, fmt=3D) at ../../binutils-gdb/gdbsupport/errors.cc:58 #10 0x00000000008b5ace in reg_buffer::assert_regnum (this=3D0x301fcd0, regn= um=3D97) at ../../binutils-gdb/gdb/regcache.c:325 #11 0x00000000008b662f in regcache::raw_update (this=3D0x301fcd0, regnum=3D= 97) --Type for more, q to quit, c to continue without paging--c at ../../binutils-gdb/gdb/regcache.c:590 #12 0x00000000008b6751 in readable_regcache::raw_read (this=3D0x301fcd0, regnum=3D97, buf=3D0x319eef0 "") at ../../binutils-gdb/gdb/regcache.c:616 #13 0x00000000008aae50 in record_full_arch_list_add_reg (regcache=3D0x301fc= d0, regnum=3D97) at ../../binutils-gdb/gdb/record-full.c:623 #14 0x00000000006d76b3 in i386_process_record (gdbarch=3D0x262adc0, regcache=3D, input_addr=3D) at ../../binutils-gdb/gdb/i386-tdep.c:8065 #15 0x00000000008ab0f9 in record_full_message (regcache=3D0x301fcd0, signal=3DGDB_SIGNAL_0) at ../../binutils-gdb/gdb/record-full.c:751 #16 0x00000000008ab212 in record_full_message_wrapper_safe (regcache=3D0x30= 1fcd0, signal=3DGDB_SIGNAL_0) at ../../binutils-gdb/gdb/record-full.c:786 #17 0x00000000008ac2a3 in record_full_wait_1 (ops=3D0x2057bd0 , ptid=3D..., status=3D0x7fffffffe138, options=3D...) at ../../binutils-gdb/gdb/record-full.c:1240 #18 0x00000000008ac9d6 in record_full_base_target::wait (this=3D0x2057bd0 , ptid=3D..., status=3D0x7fffffffe138, options=3D...) at ../../binutils-gdb/gdb/record-full.c:1467 #19 0x0000000000a77ac2 in target_wait (ptid=3D..., status=3D0x7fffffffe138, options=3D...) at ../../binutils-gdb/gdb/target.c:2586 #20 0x0000000000701cba in do_target_wait_1 (inf=3D, ptid=3D.= .., status=3D0x7fffffffe138, options=3D...) at ../../binutils-gdb/gdb/infrun.c:= 3864 --=20 You are receiving this mail because: You are on the CC list for the bug.=