From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 792D7384B010; Wed, 24 Mar 2021 14:42:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 792D7384B010 From: "fasching.a91 at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/27644] New: GDB crashes when memset() is called with "print" command Date: Wed, 24 Mar 2021 14:42:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 10.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fasching.a91 at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: Wed, 24 Mar 2021 14:42:26 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27644 Bug ID: 27644 Summary: GDB crashes when memset() is called with "print" command Product: gdb Version: 10.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: fasching.a91 at gmail dot com Target Milestone: --- OS: Centos 7 Docker container on Arch Linux host GDB: 10.1 GCC: 4.8.5 20150623 (Red Hat 4.8.5-44) GLIBC: glibc-2.17-323.el7_9.x86_64 Kernel: 5.11.8-arch1-1 STEPS TO REPRODUCE =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1. Required files --------------------------------------- $ cat program.c int main(int argc, char **argv) { return 0; } $ cat commands.gdb break main run p (void *) memset((void *) 0, (int) 0, (unsigned long) 0) 2. Compile the program and run GDB --------------------------------------- $ gcc -g -o program program.c $ gdb --batch -x commands.gdb program Breakpoint 1 at 0x4004f8: file program.c, line 2. Breakpoint 1, main (argc=3D1, argv=3D0x7ffc9b42c118) at program.c:2 2 return 0; regcache.c:732: internal-error: value* readable_regcache::cooked_read_value(int): Assertion `regnum < m_descr->nr_cooked_registers' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) [answered Y; input not from terminal] This is a bug, please report it. For instructions, see: . regcache.c:732: internal-error: value* readable_regcache::cooked_read_value(int): Assertion `regnum < m_descr->nr_cooked_registers' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Create a core file of GDB? (y or n) [answered Y; input not from terminal] Aborted (core dumped) --------------------------------------- --=20 You are receiving this mail because: You are on the CC list for the bug.=