public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "zbigniew2011 at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/30872] New: Assertion `buffer.copy_insn_closure.get () != nullptr' failed
Date: Tue, 19 Sep 2023 09:43:55 +0000	[thread overview]
Message-ID: <bug-30872-4717@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 30872
           Summary: Assertion `buffer.copy_insn_closure.get () != nullptr'
                    failed
           Product: gdb
           Version: 13.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: zbigniew2011 at gmail dot com
  Target Milestone: ---

During any attempt of debugging session with ARM32 assembler binary gdb
13.1/13.2 breaks on regular basis:

(gdb) break _start
Breakpoint 1 at 0x1005c
(gdb) run
Starting program: /home/zb/devel/pi-asm-master/06_first_data.bin 

Breakpoint 1, 0x0001005c in _start ()
(gdb) nexti
0x00010060 in _start ()
(gdb) nexti
/build/gdb-qUBixh/gdb-13.2/gdb/displaced-stepping.c:287: internal-error:
copy_insn_closure_by_addr: Assertion `buffer.copy_insn_closure.get () !=
nullptr' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
----- Backtrace -----
0x4ce739 ???
0x6ea34b ???
0x6ea4f1 ???
0x7ce215 ???
0x53065b ???
[..]
0x585b15 ???
0x584a49 ???
---------------------
/build/gdb-qUBixh/gdb-13.2/gdb/displaced-stepping.c:287: internal-error:
copy_insn_closure_by_addr: Assertion `buffer.copy_insn_closure.get () !=
nullptr' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n

About any simple assembler program can be used to repeat this; it happens all
the time. Still I paste the one used in that attempt:
=====================================
.section .rodata 
msg:
    .ascii "Hello, World\n"

.text
.align 2

SYS_EXIT = 1
SYS_WRITE = 4
STDOUT = 1

.global _start

exit:
    mov    r7, #SYS_EXIT
    svc    #0

_start:
    mov    r7, #SYS_WRITE
    mov    r0, #STDOUT
    ldr    r1, =msg
    mov    r2, #13
    svc    #0

    // Now exit
    mov    r0, #0
    b      exit
==============================
as program.s -o program.o && ld program.o -o program.bin
Then simply: gdb -q ./program.bin — and the rest like above; after second or
third „nexti” gdb will ALWAYS break.

Tested both 13.1 and 13.2 versions of gdb.

Gear: Banana Pi M2+, Armbian „Bookworm”, ARM32 — here's an excerpt from
cpuinfo:

processor       : 0
model name      : ARMv7 Processor rev 5 (v7l)
BogoMIPS        : 22.85
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
vfpd32 lpae evtstrm 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 5
[..]
Hardware        : Allwinner sun8i Family
Revision        : 0000
Serial          : 02c00081f0069981

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

             reply	other threads:[~2023-09-19  9:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-19  9:43 zbigniew2011 at gmail dot com [this message]
2023-09-19 12:02 ` [Bug gdb/30872] " zbigniew2011 at gmail dot com
2023-09-19 12:29 ` tromey at sourceware dot org
2023-09-19 12:34 ` zbigniew2011 at gmail dot com
2023-09-19 16:02 ` ssbssa at sourceware dot org
2023-09-19 18:00 ` tromey at sourceware dot org
2023-09-19 20:31 ` luis.machado at arm dot com
2023-09-27 11:46 ` luis.machado at arm dot com
2023-09-27 12:39 ` luis.machado at arm dot com
2023-09-27 13:27 ` zbigniew2011 at gmail dot com
2023-09-27 14:07 ` luis.machado at arm dot com
2023-09-28  8:13 ` luis.machado at arm dot com
2023-09-28 10:50 ` sam at gentoo dot org
2023-09-29  8:16 ` luis.machado at arm dot com
2023-10-16 10:57 ` cvs-commit at gcc dot gnu.org
2023-10-16 10:59 ` cvs-commit at gcc dot gnu.org
2023-10-16 11:01 ` luis.machado at arm dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-30872-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).