From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DE73F3858D32; Sun, 25 Dec 2022 23:37:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE73F3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1672011454; bh=lAqHEBRRFecoR2z08pecSu1BStOXb3MxNMMPWt6cIuI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=psMUK9SBJuBszp40Vf0oubN55IshX8QS5Ca8ao+ug42/f+/wsrdZwnXBdyV2EiX/T hsKYZe0iAMDH0mLGf048jG3zFiTDeE4DTZfW/ZVeem1clYJ/qP+5pnZxon8ct8VORc tLyjdXVEw462F8IPv2zg2E4hFCEJPammLgnbY73I= From: "mark at klomp dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/29941] Inferior call strlen(p) gives segfaults in GDB 13, (somewhat?) works in GDB11 and GDB12 Date: Sun, 25 Dec 2022 23:37:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp 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: cc 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=3D29941 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at klomp dot org --- Comment #1 from Mark Wielaard --- The same crashes for me with gdb build from current git source on arm64. It crashes here: Thread 1 "gdb" received signal SIGSEGV, Segmentation fault. 0x00000055558457b8 in get_frame_arch (this_frame=3D...) at /home/mark/src/binutils-gdb/gdb/frame.c:2890 2890 return frame_unwind_arch (frame_info_ptr (this_frame->next)); Turns out this_frame->next =3D=3D NULL: (gdb) print this_frame $1 =3D {> =3D {next =3D 0x0, prev =3D 0x7fffffe8d8}, m_ptr =3D 0x0,=20 m_cached_id =3D {stack_addr =3D 0, code_addr =3D 0, special_addr =3D 0, s= tack_status =3D FID_STACK_INVALID,=20 code_addr_p =3D 0, special_addr_p =3D 0, artificial_depth =3D 0}, static frame_list =3D { m_front =3D 0x5556025c00 , m_back =3D 0x7fffffe438}} But the first thing frame_unwind_arch does is dereference its argument: (gdb) list 2885 /* Architecture methods. */ 2886=20=20=20=20 2887 struct gdbarch * 2888 get_frame_arch (frame_info_ptr this_frame) 2889 { 2890 return frame_unwind_arch (frame_info_ptr (this_frame->next)); 2891 } 2892=20=20=20=20 2893 struct gdbarch * 2894 frame_unwind_arch (frame_info_ptr next_frame) 2895 { 2896 if (!next_frame->prev_arch.p) 2897 { --=20 You are receiving this mail because: You are on the CC list for the bug.=