From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 43F943858D33; Wed, 3 May 2023 20:21:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 43F943858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683145306; bh=HRymhK5OX8camfL1rzpbyz5Rmk23B8K2xjsiYQI90zk=; h=From:To:Subject:Date:From; b=GrPUe1ThZl6Htdq2I/tXPxQKIwP414BgnPTmcEIRg6xcrxCuB7E5HwPyjIPIKn38p 68dTrF0umzHfTWA888c+hA+Niwuq9utX/LbkS3cwpD9tqKgfVM0Cm+p+3VmUjIUaob PAs3kVhu3SZCtA1Sjbc9+MTZDqytjOhOYwT5mU1Y= From: "chergert at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109719] New: Truncated frame-pointer unwinding via Linux perf with g++ Date: Wed, 03 May 2023 20:21:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: chergert at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.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://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109719 Bug ID: 109719 Summary: Truncated frame-pointer unwinding via Linux perf with g++ Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: chergert at redhat dot com Target Milestone: --- On Fedora 38, frame-pointers are enabled by default. Caveats of course. However, I noticed that clang++ is generating code that can unwind with frame-pointers just fine where as g++ is generating code that fails to unwi= nd past a single frame for some projects. Where I've noticed this is when profiling GTK/GNOME applications. Harfbuzz, which is C++ (no-rtti, no-exceptions, no-threadsafe-statics, and no stdlibc= ++), regularly results in stacktraces from Linux perf containing 2 frames. One of them looks corrupted, and the second to a Harfbuzz function. When I recompile the project with clang++ instead (leaving the rest of the system still compiled with gcc) I get proper stacktraces from Linux perf showing how the Harfbuzz API was called (via GLib/GTK/Pango/etc). Happy to provide more information and/or be remote hands/eyes. Thanks!=