From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B0F3E385801A; Sat, 23 Jan 2021 06:38:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B0F3E385801A From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/27205] [-m32] FAIL: gdb.base/longjmp.exp: next over longjmp(1) Date: Sat, 23 Jan 2021 06:38:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints 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: 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 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: Sat, 23 Jan 2021 06:38:40 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27205 --- Comment #1 from Tom de Vries --- The failure to access memory is due to glibc having pointer encryption (aka "pointer mangling" or "pointer guard") of the long jump buffer. So, when we're trying to read pc from the long jump buffer in i386_get_longjmp_target, we get an encrypted pointer, and don't decrypt it.= =20 This issue has been known for a bit, see https://sourceware.org/legacy-ml/gdb-patches/2008-04/msg00127.html. Possibly error mode could be improved: if we can detect that pc is not in a text segment or displaced stepping buffer, we return 0 in i386_get_longjmp_target, and revert to single stepping. Anyway, the reason we're exercising i386_get_longjmp_target is that this fa= ils: ... /* If we set the longjmp breakpoint via a SystemTap probe,=20=20= =20=20=20=20=20=20=20=20=20=20 then use it to extract the arguments. The destination PC=20= =20=20=20=20=20=20=20=20=20 is the third argument to the probe. */ arg_value =3D probe_safe_evaluate_at_pc (frame, 2); ... I double checked on openSUSE Leap 15.2 and there this works, so I'll try to figure out what's the difference. --=20 You are receiving this mail because: You are on the CC list for the bug.=