public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "mark at klomp dot org" <sourceware-bugzilla@sourceware.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 [thread overview] Message-ID: <bug-29941-4717-sdnFawiFVW@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-29941-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=29941 Mark Wielaard <mark at klomp dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at klomp dot org --- Comment #1 from Mark Wielaard <mark at klomp dot org> --- 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=...) 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 == NULL: (gdb) print this_frame $1 = {<intrusive_list_node<frame_info_ptr>> = {next = 0x0, prev = 0x7fffffe8d8}, m_ptr = 0x0, m_cached_id = {stack_addr = 0, code_addr = 0, special_addr = 0, stack_status = FID_STACK_INVALID, code_addr_p = 0, special_addr_p = 0, artificial_depth = 0}, static frame_list = { m_front = 0x5556025c00 <selected_frame>, m_back = 0x7fffffe438}} But the first thing frame_unwind_arch does is dereference its argument: (gdb) list 2885 /* Architecture methods. */ 2886 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 2893 struct gdbarch * 2894 frame_unwind_arch (frame_info_ptr next_frame) 2895 { 2896 if (!next_frame->prev_arch.p) 2897 { -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-12-25 23:37 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-12-25 20:47 [Bug gdb/29941] New: " philippe.waroquiers at skynet dot be 2022-12-25 23:37 ` mark at klomp dot org [this message] 2022-12-26 7:39 ` [Bug gdb/29941] " vries at gcc dot gnu.org 2022-12-26 12:59 ` aburgess at redhat dot com 2022-12-26 13:08 ` vries at gcc dot gnu.org 2023-01-03 9:18 ` cvs-commit at gcc dot gnu.org 2023-01-03 10:53 ` cvs-commit at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-29941-4717-sdnFawiFVW@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).