public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/15461] New: crash: gdb-7.6 gdbarch in archpy_disassemble() overwritten with NULL causes crash due to assert(gdbarch != NULL)
@ 2013-05-12  2:05 donb at capitolhillconsultants dot com
  2013-08-25  6:27 ` [Bug python/15461] " mail at dbalan dot in
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: donb at capitolhillconsultants dot com @ 2013-05-12  2:05 UTC (permalink / raw)
  To: gdb-prs

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.


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

end of thread, other threads:[~2013-08-30 10:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-12  2:05 [Bug python/15461] New: crash: gdb-7.6 gdbarch in archpy_disassemble() overwritten with NULL causes crash due to assert(gdbarch != NULL) donb at capitolhillconsultants dot com
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

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