* [Bug gdb/30705] [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault)
2023-07-31 9:59 [Bug gdb/30705] New: [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault) vries at gcc dot gnu.org
@ 2023-07-31 10:01 ` vries at gcc dot gnu.org
2023-07-31 10:07 ` vries at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2023-07-31 10:01 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30705
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #0)
> UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf:
> endian=auto: disassemble 0x100,+4
The other one is the same, for arch=xbfp:
...
UNRESOLVED: gdb.base/all-architectures-7.exp: tests: osabi=AIX: arch=xbpf:
endian=auto: disassemble 0x100,+4
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/30705] [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault)
2023-07-31 9:59 [Bug gdb/30705] New: [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault) vries at gcc dot gnu.org
2023-07-31 10:01 ` [Bug gdb/30705] " vries at gcc dot gnu.org
@ 2023-07-31 10:07 ` vries at gcc dot gnu.org
2023-07-31 10:09 ` vries at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2023-07-31 10:07 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30705
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Reproducer:
...
$ cat gdb.in
set osabi AIX
set endian little
set architecture bpf
disassemble 0x100,+4
$ gdb -q -batch -x gdb.in
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug gdb/30705] [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault)
2023-07-31 9:59 [Bug gdb/30705] New: [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault) vries at gcc dot gnu.org
2023-07-31 10:01 ` [Bug gdb/30705] " vries at gcc dot gnu.org
2023-07-31 10:07 ` vries at gcc dot gnu.org
@ 2023-07-31 10:09 ` vries at gcc dot gnu.org
2023-07-31 10:14 ` [Bug tdep/30705] " vries at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2023-07-31 10:09 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30705
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
It's because we dereference info->section, which is a nullptr:
...
#0 0x0000000000efcdc4 in print_insn_bpf (pc=256, info=0x7fffffffcb28) at
/data/vries/gdb/src/opcodes/bpf-dis.c:152
152 struct bfd *abfd = info->section->owner;
(gdb) p info->section
$3 = (asection *) 0x0
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tdep/30705] [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault)
2023-07-31 9:59 [Bug gdb/30705] New: [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault) vries at gcc dot gnu.org
` (2 preceding siblings ...)
2023-07-31 10:09 ` vries at gcc dot gnu.org
@ 2023-07-31 10:14 ` vries at gcc dot gnu.org
2023-07-31 10:45 ` jose.marchesi at oracle dot com
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2023-07-31 10:14 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30705
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|gdb |tdep
CC| |jose.marchesi at oracle dot com
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Regression since commit 1e18ffc9915 ("bpf: include, bfd, opcodes: add
EF_BPF_CPUVER ELF header flags").
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tdep/30705] [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault)
2023-07-31 9:59 [Bug gdb/30705] New: [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault) vries at gcc dot gnu.org
` (3 preceding siblings ...)
2023-07-31 10:14 ` [Bug tdep/30705] " vries at gcc dot gnu.org
@ 2023-07-31 10:45 ` jose.marchesi at oracle dot com
2023-07-31 11:03 ` vries at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jose.marchesi at oracle dot com @ 2023-07-31 10:45 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30705
Jose E. Marchesi <jose.marchesi at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |jose.marchesi at oracle dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tdep/30705] [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault)
2023-07-31 9:59 [Bug gdb/30705] New: [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault) vries at gcc dot gnu.org
` (4 preceding siblings ...)
2023-07-31 10:45 ` jose.marchesi at oracle dot com
@ 2023-07-31 11:03 ` vries at gcc dot gnu.org
2023-07-31 11:16 ` vries at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2023-07-31 11:03 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30705
--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Also, I'm seeming in gdb.gdb/unittest.exp:
...
Running selftest buffered_insn_length::bpf.^M
^M
^M
Fatal signal: Segmentation fault^M
...
Reproducer:
...
$ gdb -q -batch -ex "maint selftest buffered_insn_length::bpf"
...
In this case, we're segfaulting here because abfd is nullptr:
...
Thread 1 "gdb" received signal SIGSEGV, Segmentation fault.
print_insn_bpf (pc=0, info=0x7fffffffd398) at
/data/vries/gdb/src/opcodes/bpf-dis.c:153
153 Elf_Internal_Ehdr *header = elf_elfheader (abfd);
...
which gets it's value in the same line as mentioned in comment 3:
...
152 struct bfd *abfd = info->section->owner;
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tdep/30705] [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault)
2023-07-31 9:59 [Bug gdb/30705] New: [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault) vries at gcc dot gnu.org
` (5 preceding siblings ...)
2023-07-31 11:03 ` vries at gcc dot gnu.org
@ 2023-07-31 11:16 ` vries at gcc dot gnu.org
2023-07-31 13:03 ` mark at klomp dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2023-07-31 11:16 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30705
--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #5)
> $ gdb -q -batch -ex "maint selftest buffered_insn_length::bpf"
FTR, likewise for "maint selftest buffered_insn_length::bpf::xbfp".
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tdep/30705] [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault)
2023-07-31 9:59 [Bug gdb/30705] New: [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault) vries at gcc dot gnu.org
` (6 preceding siblings ...)
2023-07-31 11:16 ` vries at gcc dot gnu.org
@ 2023-07-31 13:03 ` mark at klomp dot org
2023-07-31 13:46 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: mark at klomp dot org @ 2023-07-31 13:03 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30705
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at klomp dot org
--- Comment #7 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Tom de Vries from comment #4)
> Regression since commit 1e18ffc9915 ("bpf: include, bfd, opcodes: add
> EF_BPF_CPUVER ELF header flags").
That is https://builder.sourceware.org/buildbot/#/changes/29867 which indeed
sees a lot of RED for the gdb check results.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tdep/30705] [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault)
2023-07-31 9:59 [Bug gdb/30705] New: [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault) vries at gcc dot gnu.org
` (7 preceding siblings ...)
2023-07-31 13:03 ` mark at klomp dot org
@ 2023-07-31 13:46 ` cvs-commit at gcc dot gnu.org
2023-07-31 14:15 ` vries at gcc dot gnu.org
2023-07-31 21:04 ` vries at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-31 13:46 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30705
--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jose E. Marchesi
<jemarch@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5b512234c874d5f82734dc6115765bc691c2c982
commit 5b512234c874d5f82734dc6115765bc691c2c982
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Date: Mon Jul 31 15:44:36 2023 +0200
bpf: opcodes: fix regression in BPF disassembler
This patch fixes a regression recently introduced in the BPF
disassembler, that was assuming an abfd was always available in
info->section->owner. Apparently this is not so in GDB, and therefore
https://sourceware.org/bugzilla/show_bug.cgi?id=30705.
Tested in bpf-unkonwn-none.
opcodes/ChangeLog:
2023-07-31 Jose E. Marchesi <jose.marchesi@oracle.com>
PR 30705
* bpf-dis.c (print_insn_bpf): Check that info->section->owner is
actually available before using it.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tdep/30705] [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault)
2023-07-31 9:59 [Bug gdb/30705] New: [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault) vries at gcc dot gnu.org
` (8 preceding siblings ...)
2023-07-31 13:46 ` cvs-commit at gcc dot gnu.org
@ 2023-07-31 14:15 ` vries at gcc dot gnu.org
2023-07-31 21:04 ` vries at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2023-07-31 14:15 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30705
--- Comment #9 from Tom de Vries <vries at gcc dot gnu.org> ---
The commit fixes the regressions for me, thanks.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tdep/30705] [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault)
2023-07-31 9:59 [Bug gdb/30705] New: [gdb] UNRESOLVED: gdb.base/all-architectures-2.exp: tests: osabi=AIX: arch=bpf: endian=auto: disassemble 0x100,+4 (segfault) vries at gcc dot gnu.org
` (9 preceding siblings ...)
2023-07-31 14:15 ` vries at gcc dot gnu.org
@ 2023-07-31 21:04 ` vries at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2023-07-31 21:04 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30705
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
Target Milestone|--- |14.1
--- Comment #10 from Tom de Vries <vries at gcc dot gnu.org> ---
Fixed by commit. Also buildbot seems happy again.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread