From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B00523858D37; Mon, 26 Dec 2022 07:39:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B00523858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1672040387; bh=2RGMKSvED5kh1/7BzWE2LMqm0bgX0MWlaOhkNrbG09Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lgPY6blVWTMRaHEYSef1S8SKoPeL+IJX9NJ3/B/+rzrtDz+KrkUvaVTQj4SRrtmIx doJazOhRV/Hk65DWeRPnlVpL9Z3CuYmd07HdF1j0XOA6kY5tOFmRKipkMPNirAhEU2 JwL7ijVtvwWEnuqUrT7HTFo6/J3tgd6LrSHgb/vI= From: "vries at gcc dot gnu.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: Mon, 26 Dec 2022 07:39:47 +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: vries at gcc dot gnu.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 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vries at gcc dot gnu.org --- Comment #2 from Tom de Vries --- This seems to fix it: ... diff --git a/gdb/infcall.c b/gdb/infcall.c index c1db3e22189..9bfc3216c5a 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -857,6 +857,7 @@ call_function_by_hand_dummy (struct value *function, type *ftype; type *values_type; CORE_ADDR funaddr =3D find_function_addr (function, &values_type, &ftype= ); + frame =3D get_current_frame (); if (is_nocall_function (ftype)) error (_("Cannot call the function '%s' which does not follow the " ... Note that during find_function_addr, a call to call_function_by_hand_dummy = is done for elf_gnu_ifunc_resolve_addr, which pushes and pops a dummy frame. I don't understand the frame tracking concepts well enough to say whether t= his is a fix or a workaround. --=20 You are receiving this mail because: You are on the CC list for the bug.=