From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D33613858C53; Tue, 26 Jul 2022 06:48:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D33613858C53 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug tdep/29408] New: [gdb, tdep/aarch64] FAIL: gdb.base/large-frame.exp: optimize=-O0: backtrace Date: Tue, 26 Jul 2022 06:48:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tdep 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: 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://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: Tue, 26 Jul 2022 06:48:33 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29408 Bug ID: 29408 Summary: [gdb, tdep/aarch64] FAIL: gdb.base/large-frame.exp: optimize=3D-O0: backtrace Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: tdep Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- I'm running into: ... FAIL: gdb.base/large-frame.exp: optimize=3D-O0: backtrace FAIL: gdb.base/large-frame.exp: optimize=3D-O1: backtrace FAIL: gdb.base/large-frame.exp: optimize=3D-O2: backtrace ... In more detail: ... (gdb) PASS: gdb.base/large-frame.exp: optimize=3D-O0: continue to breakpoin= t: blah backtrace^M #0 blah (a=3D0xffffffffabf0) at /home/tdevries/gdb/src/gdb/testsuite/gdb.base/large-frame-1.c:24^M #1 0x0000000000400628 in func ()^M Backtrace stopped: previous frame identical to this frame (corrupt stack?)^M (gdb) FAIL: gdb.base/large-frame.exp: optimize=3D-O0: backtrace ... With this however, it passes: ... diff --git a/gdb/testsuite/gdb.base/large-frame-2.c b/gdb/testsuite/gdb.base/large-frame-2.c index dd23c6da539..313a28c3790 100644 --- a/gdb/testsuite/gdb.base/large-frame-2.c +++ b/gdb/testsuite/gdb.base/large-frame-2.c @@ -20,7 +20,7 @@ __attribute__ ((noinline)) int func (void) { - int a[4096]; + int a[1]; blah (a); return 0; } ... Bisecting with the constant gives us a pass at 'a[1024-4]' and a fail at a[1024-3]. Running with debug frame: ... $ gdb -q -batch -iex "set debug frame 1" -iex "set trace-commands on" -x ./build/gdb/testsuite/outputs/gdb.base/large-frame/gdb.in.1 2>&1 | tee LOG ... gives us the info that we run into the problems with unwinding: ... [frame] frame_id_eq: l=3D{stack=3D0xffffffffe330,code=3D0x0000000000400610,!special}, r=3D{stack= =3D\ 0xffffffffe330,code=3D0x0000000000400610,!special} -> 1 ... at pc address 0x400610, which corresponds to func, and also (not shown here) that the used unwinder is "aarch64 prologue". Indeed with 'a[1024-4]' we have: ... 0000000000400610 : 400610: d14007ff sub sp, sp, #0x1, lsl #12 ... and with 'a[1024-3]': ... 0000000000400610 : 400610: d2820210 mov x16, #0x1010 // #4112 400614: cb3063ff sub sp, sp, x16 ... So, does the aarch64 prologue analyzer fail at that point? Checking with "= set debug aarch64 1" we get: ... [aarch64] aarch64_analyze_prologue: prologue analysis gave up addr=3D0x= 400614 opcode=3D0xcb3063ff ... --=20 You are receiving this mail because: You are on the CC list for the bug.=