From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29197 invoked by alias); 12 May 2013 02:05:10 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 29167 invoked by uid 48); 12 May 2013 02:05:08 -0000 From: "donb at capitolhillconsultants dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: python X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: donb at capitolhillconsultants dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-q2/txt/msg00237.txt.bz2 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 (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 (gdb) c Continuing. Breakpoint 3, 0x00000000004de560 in archpy_disassemble (self=, args=, kw=) at ./python/py-arch.c:107 107 if (!PyArg_ParseTupleAndKeywords (args, kw, GDB_PY_LLU_ARG "|OO", keywords, 2: self = 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.