This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/15461] New: crash: gdb-7.6 gdbarch in archpy_disassemble() overwritten with NULL causes crash due to assert(gdbarch != NULL)
- From: "donb at capitolhillconsultants dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sun, 12 May 2013 02:05:07 +0000
- Subject: [Bug python/15461] New: crash: gdb-7.6 gdbarch in archpy_disassemble() overwritten with NULL causes crash due to assert(gdbarch != NULL)
- Auto-submitted: auto-generated
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.