public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression
@ 2024-01-19 15:42 simark at simark dot ca
  2024-01-19 15:42 ` [Bug gdb/31268] " simark at simark dot ca
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: simark at simark dot ca @ 2024-01-19 15:42 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31268

            Bug ID: 31268
           Summary: gdb.base/unwind-on-each-insn-amd64.exp regression
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: simark at simark dot ca
  Target Milestone: ---

I see:

FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: $fba_value ==
$fn_fba
FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: check
frame-id matches
FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: bt 2
FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: up
FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: $sp_value ==
$::main_sp
FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: $fba_value ==
$::main_fba
FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: [string equal
$fid $::main_fid]


Tom Tromey said he was only able to reproduce with an ASan build, so it might
be important here, even though gdb.log doesn't contain an ASan error.  The
first error is:

 380 (gdb) PASS: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6:
get $sp and frame base for fn: get hexadecimal valueof "$sp"
 381 info frame^M
 382 Stack level 0, frame at 0x7fffffffd5a0:^M
 383  rip = 0x40112f in foo
(/home/vries/gdb_versions/devel/src/gdb/testsuite/gdb.base/unwind-on-each-insn-foo.c:22);
saved rip = 0x7ffff7df01ca^M
 384  called by frame at 0x7fffffffd640^M
 385  source language c.^M
 386  Arglist at 0x7fffffffd590, args: s=0x401114 <main+14> "\277\b @"^M
 387  Locals at 0x7fffffffd590, Previous frame's sp is 0x7fffffffd5a0^M
 388  Saved registers:^M
 389   rbp at 0x7fffffffd590, rip at 0x7fffffffd598^M
 390 (gdb) FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6:
$fba_value == $fn_fba

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug gdb/31268] gdb.base/unwind-on-each-insn-amd64.exp regression
  2024-01-19 15:42 [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression simark at simark dot ca
@ 2024-01-19 15:42 ` simark at simark dot ca
  2024-01-20 14:52 ` vries at gcc dot gnu.org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: simark at simark dot ca @ 2024-01-19 15:42 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31268

Simon Marchi <simark at simark dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |blarsen at redhat dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug gdb/31268] gdb.base/unwind-on-each-insn-amd64.exp regression
  2024-01-19 15:42 [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression simark at simark dot ca
  2024-01-19 15:42 ` [Bug gdb/31268] " simark at simark dot ca
@ 2024-01-20 14:52 ` vries at gcc dot gnu.org
  2024-01-20 14:52 ` vries at gcc dot gnu.org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2024-01-20 14:52 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31268

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vries at gcc dot gnu.org

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Simon Marchi from comment #0)
> Tom Tromey said he was only able to reproduce with an ASan build

+1.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug gdb/31268] gdb.base/unwind-on-each-insn-amd64.exp regression
  2024-01-19 15:42 [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression simark at simark dot ca
  2024-01-19 15:42 ` [Bug gdb/31268] " simark at simark dot ca
  2024-01-20 14:52 ` vries at gcc dot gnu.org
@ 2024-01-20 14:52 ` vries at gcc dot gnu.org
  2024-01-20 14:53 ` vries at gcc dot gnu.org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2024-01-20 14:52 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31268

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 15314
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15314&action=edit
gdb.fail.log (with asan)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug gdb/31268] gdb.base/unwind-on-each-insn-amd64.exp regression
  2024-01-19 15:42 [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression simark at simark dot ca
                   ` (2 preceding siblings ...)
  2024-01-20 14:52 ` vries at gcc dot gnu.org
@ 2024-01-20 14:53 ` vries at gcc dot gnu.org
  2024-01-21 10:43 ` vries at gcc dot gnu.org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2024-01-20 14:53 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31268

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 15315
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15315&action=edit
gdb.pass.log (without asan)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug gdb/31268] gdb.base/unwind-on-each-insn-amd64.exp regression
  2024-01-19 15:42 [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression simark at simark dot ca
                   ` (3 preceding siblings ...)
  2024-01-20 14:53 ` vries at gcc dot gnu.org
@ 2024-01-21 10:43 ` vries at gcc dot gnu.org
  2024-03-27 14:26 ` vries at gcc dot gnu.org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2024-01-21 10:43 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31268

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Bisects to:
...
commit 528b729be1a293a21f44149351f3eba5b4e2d870
Author: Guinevere Larsen <blarsen@redhat.com>
Date:   Wed Nov 1 17:25:32 2023 +0100

    gdb/dwarf2: Add support for DW_LNS_set_epilogue_begin in line-table
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug gdb/31268] gdb.base/unwind-on-each-insn-amd64.exp regression
  2024-01-19 15:42 [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression simark at simark dot ca
                   ` (4 preceding siblings ...)
  2024-01-21 10:43 ` vries at gcc dot gnu.org
@ 2024-03-27 14:26 ` vries at gcc dot gnu.org
  2024-03-27 14:29 ` vries at gcc dot gnu.org
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2024-03-27 14:26 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31268

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Hmm, I'm running into this now after installing package gcc-PIE on my system.

It's a hardcoded .S file, maybe nopie is required?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug gdb/31268] gdb.base/unwind-on-each-insn-amd64.exp regression
  2024-01-19 15:42 [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression simark at simark dot ca
                   ` (5 preceding siblings ...)
  2024-03-27 14:26 ` vries at gcc dot gnu.org
@ 2024-03-27 14:29 ` vries at gcc dot gnu.org
  2024-04-01  7:56 ` vries at gcc dot gnu.org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2024-03-27 14:29 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31268

--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #5)
> Hmm, I'm running into this now after installing package gcc-PIE on my system.
> 
> It's a hardcoded .S file, maybe nopie is required?

Though when running with target board unix/-fPIE/-pie, it passes.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug gdb/31268] gdb.base/unwind-on-each-insn-amd64.exp regression
  2024-01-19 15:42 [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression simark at simark dot ca
                   ` (6 preceding siblings ...)
  2024-03-27 14:29 ` vries at gcc dot gnu.org
@ 2024-04-01  7:56 ` vries at gcc dot gnu.org
  2024-04-02 12:04 ` [Bug symtab/31268] " vries at gcc dot gnu.org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2024-04-01  7:56 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31268

--- Comment #7 from Tom de Vries <vries at gcc dot gnu.org> ---
This patch (
https://sourceware.org/pipermail/gdb-patches/2024-March/207709.html ) was
submitted, that seems to address this PR.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug symtab/31268] gdb.base/unwind-on-each-insn-amd64.exp regression
  2024-01-19 15:42 [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression simark at simark dot ca
                   ` (7 preceding siblings ...)
  2024-04-01  7:56 ` vries at gcc dot gnu.org
@ 2024-04-02 12:04 ` vries at gcc dot gnu.org
  2024-04-08 13:06 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2024-04-02 12:04 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31268

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|gdb                         |symtab

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug symtab/31268] gdb.base/unwind-on-each-insn-amd64.exp regression
  2024-01-19 15:42 [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression simark at simark dot ca
                   ` (8 preceding siblings ...)
  2024-04-02 12:04 ` [Bug symtab/31268] " vries at gcc dot gnu.org
@ 2024-04-08 13:06 ` vries at gcc dot gnu.org
  2024-04-14 18:03 ` brobecker at gnat dot com
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2024-04-08 13:06 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31268

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |15.1

--- Comment #8 from Tom de Vries <vries at gcc dot gnu.org> ---
I'd like the fix (currently discussed on the ml) for this PR to be included in
the 15.1 release.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug symtab/31268] gdb.base/unwind-on-each-insn-amd64.exp regression
  2024-01-19 15:42 [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression simark at simark dot ca
                   ` (9 preceding siblings ...)
  2024-04-08 13:06 ` vries at gcc dot gnu.org
@ 2024-04-14 18:03 ` brobecker at gnat dot com
  2024-04-15 11:48 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: brobecker at gnat dot com @ 2024-04-14 18:03 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31268

Joel Brobecker <brobecker at gnat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |brobecker at gnat dot com

--- Comment #9 from Joel Brobecker <brobecker at gnat dot com> ---
Hi Tom,

> I'd like the fix for this PR to be included in the 15.1 release.

For the record, can you say which consideration(s?) made you reach this
assessment? 

Looking at the fix, and in particular the title of the fix (out of bounds array
access), I'm guessing that the out-of-bound condition is considered
sufficiently critical that the fix should be in the release.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug symtab/31268] gdb.base/unwind-on-each-insn-amd64.exp regression
  2024-01-19 15:42 [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression simark at simark dot ca
                   ` (10 preceding siblings ...)
  2024-04-14 18:03 ` brobecker at gnat dot com
@ 2024-04-15 11:48 ` vries at gcc dot gnu.org
  2024-04-24 14:27 ` cvs-commit at gcc dot gnu.org
  2024-04-24 21:12 ` vries at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2024-04-15 11:48 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31268

--- Comment #10 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Joel Brobecker from comment #9)
> Hi Tom,
> 
> > I'd like the fix for this PR to be included in the 15.1 release.
> 
> For the record, can you say which consideration(s?) made you reach this
> assessment? 
> 
> Looking at the fix, and in particular the title of the fix (out of bounds
> array access), I'm guessing that the out-of-bound condition is considered
> sufficiently critical that the fix should be in the release.

Hi Joel,

indeed, it's the fact that's it's an out-of-bound condition.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug symtab/31268] gdb.base/unwind-on-each-insn-amd64.exp regression
  2024-01-19 15:42 [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression simark at simark dot ca
                   ` (11 preceding siblings ...)
  2024-04-15 11:48 ` vries at gcc dot gnu.org
@ 2024-04-24 14:27 ` cvs-commit at gcc dot gnu.org
  2024-04-24 21:12 ` vries at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-24 14:27 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31268

--- Comment #11 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Bernd Edlinger <edlinger@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=63ddc8af5d7d3ad909aad66291f23507ba987bb4

commit 63ddc8af5d7d3ad909aad66291f23507ba987bb4
Author: Bernd Edlinger <bernd.edlinger@hotmail.de>
Date:   Tue Apr 9 09:27:52 2024 +0000

    Fix an out of bounds array access in find_epilogue_using_linetable

    An out of bounds array access in find_epilogue_using_linetable causes
random
    test failures like these:

    FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6:
$fba_value == $fn_fba
    FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: check
frame-id matches
    FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: bt 2
    FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: up
    FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: $sp_value
== $::main_sp
    FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6:
$fba_value == $::main_fba
    FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: [string
equal $fid $::main_fid]

    Here the read happens below the first element of the line
    table, and the test failure depends on the value that is
    read from there.

    It also happens that std::lower_bound returns a pointer exactly at the
upper
    bound of the line table, also here the read value is undefined, that
happens
    in this test:

    FAIL: gdb.dwarf2/dw2-epilogue-begin.exp: confirm watchpoint doesn't trigger

    Fixes: 528b729be1a2 ("gdb/dwarf2: Add support for DW_LNS_set_epilogue_begin
in line-table")

    Co-Authored-By: Tom de Vries <tdevries@suse.de>

    PR symtab/31268
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31268

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug symtab/31268] gdb.base/unwind-on-each-insn-amd64.exp regression
  2024-01-19 15:42 [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression simark at simark dot ca
                   ` (12 preceding siblings ...)
  2024-04-24 14:27 ` cvs-commit at gcc dot gnu.org
@ 2024-04-24 21:12 ` vries at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2024-04-24 21:12 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31268

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #12 from Tom de Vries <vries at gcc dot gnu.org> ---
Fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-04-24 21:12 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-19 15:42 [Bug gdb/31268] New: gdb.base/unwind-on-each-insn-amd64.exp regression simark at simark dot ca
2024-01-19 15:42 ` [Bug gdb/31268] " simark at simark dot ca
2024-01-20 14:52 ` vries at gcc dot gnu.org
2024-01-20 14:52 ` vries at gcc dot gnu.org
2024-01-20 14:53 ` vries at gcc dot gnu.org
2024-01-21 10:43 ` vries at gcc dot gnu.org
2024-03-27 14:26 ` vries at gcc dot gnu.org
2024-03-27 14:29 ` vries at gcc dot gnu.org
2024-04-01  7:56 ` vries at gcc dot gnu.org
2024-04-02 12:04 ` [Bug symtab/31268] " vries at gcc dot gnu.org
2024-04-08 13:06 ` vries at gcc dot gnu.org
2024-04-14 18:03 ` brobecker at gnat dot com
2024-04-15 11:48 ` vries at gcc dot gnu.org
2024-04-24 14:27 ` cvs-commit at gcc dot gnu.org
2024-04-24 21:12 ` vries at gcc dot gnu.org

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).