public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "donb at capitolhillconsultants dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug python/15461] New: crash: gdb-7.6 gdbarch in archpy_disassemble() overwritten with NULL causes crash due to assert(gdbarch != NULL)
Date: Sun, 12 May 2013 02:05:00 -0000 [thread overview]
Message-ID: <bug-15461-4717@http.sourceware.org/bugzilla/> (raw)
http://sourceware.org/bugzilla/show_bug.cgi?id=15461
Bug #: 15461
Summary: crash: gdb-7.6 gdbarch in archpy_disassemble()
overwritten with NULL causes crash due to
assert(gdbarch != NULL)
Product: gdb
Version: 7.6
Status: NEW
Severity: normal
Priority: P2
Component: python
AssignedTo: unassigned@sourceware.org
ReportedBy: donb@capitolhillconsultants.com
Classification: Unclassified
gdb-7.6 release compiled from source --with-python. Installed to local. Tested
on /bin/bash to evaluate the python gdb.Architecture.disassemble() function.
Each Architecture() object fails when self is evaluated in the native code. The
core file generated by gdb, for some odd reason, is of size zero. Here is gdb
(installed on Linux Mint 14 via apt) debugging gdb-7.6:
(gdb) run
Starting program: /usr/local/bin/gdb -q /bin/bash
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Reading symbols from /bin/bash...(no debugging symbols found)...done.
(gdb) break main
Breakpoint 1 at 0x41bd70
(gdb) run
Starting program: /bin/bash
Breakpoint 1, 0x000000000041bd70 in main ()
(gdb) python
>a = gdb.Architecture()
>a.disassemble(0x000000000041bd70, 0x000000000041be00, 32)
>
Breakpoint 1, archpy_disassemble (self=0x7ffff7f61198, args=0x7ffff7ee4280,
kw=0x0) at ./python/py-arch.c:98
98 {
2: self = (PyObject *) 0x7ffff7f61198
1: gdbarch = (struct gdbarch *) 0x7ffff6e23b67 <PyCode_Optimize+2567>
(gdb) break gdb_print_insn
Breakpoint 4 at 0x5350e0: file disasm.c, line 448.
(gdb) c
Continuing.
Breakpoint 2, archpy_disassemble (self=0x7ffff7f61198, args=0x7ffff7ee4280,
kw=0x0) at ./python/py-arch.c:105
105 struct gdbarch *gdbarch = arch_object_to_gdbarch (self);
2: self = (PyObject *) 0x7ffff7f61198
1: gdbarch = (struct gdbarch *) 0xb28d80 <arch_object_type>
(gdb) c
Continuing.
Breakpoint 3, 0x00000000004de560 in archpy_disassemble (self=<optimized out>,
args=<optimized out>, kw=<optimized out>)
at ./python/py-arch.c:107
107 if (!PyArg_ParseTupleAndKeywords (args, kw, GDB_PY_LLU_ARG "|OO",
keywords,
2: self = <optimized out>
1: gdbarch = (struct gdbarch *) 0x0
(gdb) c
Continuing.
gdbarch.c:1423: internal-error: gdbarch_bfd_arch_info: Assertion `gdbarch !=
NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
donb@testmint gdb-7.6 $ ls -l core
-rwxrwx--- 1 root vboxsf 0 May 11 19:59 core
donb@testmint gdb-7.6 $ date
Sat May 11 19:59:41 MDT 2013
donb@testmint gdb-7.6 $
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
next reply other threads:[~2013-05-12 2:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-12 2:05 donb at capitolhillconsultants dot com [this message]
2013-08-25 6:27 ` [Bug python/15461] " mail at dbalan dot in
2013-08-28 10:40 ` pmuldoon at redhat dot com
2013-08-28 10:41 ` pmuldoon at redhat dot com
2013-08-28 10:45 ` pmuldoon at redhat dot com
2013-08-30 10:12 ` cvs-commit at gcc dot gnu.org
2013-08-30 10:15 ` pmuldoon at redhat 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-15461-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).