From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26042 invoked by alias); 7 Sep 2014 12:23:52 -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 21594 invoked by uid 55); 7 Sep 2014 12:23:10 -0000 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug python/17355] Crash on Python frame filters with unreadable arg Date: Sun, 07 Sep 2014 12:23:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: python X-Bugzilla-Version: 7.8 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jan.kratochvil at redhat dot com X-Bugzilla-Target-Milestone: 7.8 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q3/txt/msg00414.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17355 --- Comment #4 from cvs-commit at gcc dot gnu.org --- This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, gdb-7.8-branch has been updated via 36039ef641604d93b86688a5c8c3370b1031e28f (commit) from d63942834b80b8183b3438fc18705bb361ca1725 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=36039ef641604d93b86688a5c8c3370b1031e28f commit 36039ef641604d93b86688a5c8c3370b1031e28f Author: Jan Kratochvil Date: Sun Sep 7 14:09:59 2014 +0200 Fix crash on Python frame filters with unreadable arg https://bugzilla.redhat.com/show_bug.cgi?id=1126177 ERROR: AddressSanitizer: SEGV on unknown address 0x000000000050 (pc 0x000000992bef sp 0x7ffff9039530 bp 0x7ffff9039540 T0) #0 0x992bee in value_type .../gdb/value.c:925 #1 0x87c951 in py_print_single_arg python/py-framefilter.c:445 #2 0x87cfae in enumerate_args python/py-framefilter.c:596 #3 0x87e0b0 in py_print_args python/py-framefilter.c:968 It crashes because frame_arg::val is documented it may contain NULL (frame_arg::error is then non-NULL) but the code does not handle it. Another bug is that py_print_single_arg() calls goto out of its TRY_CATCH which messes up GDB cleanup chain crashing GDB later. It is probably 7.7 regression (I have not verified it) due to the introduction of Python frame filters. gdb/ChangeLog PR python/17355 * python/py-framefilter.c (py_print_single_arg): Handle NULL FA->VAL. Fix goto out of TRY_CATCH. gdb/testsuite/ChangeLog PR python/17355 * gdb.python/amd64-py-framefilter-invalidarg.S: New file. * gdb.python/py-framefilter-invalidarg-gdb.py.in: New file. * gdb.python/py-framefilter-invalidarg.exp: New file. * gdb.python/py-framefilter-invalidarg.py: New file. ----------------------------------------------------------------------- Summary of changes: gdb/ChangeLog | 6 + gdb/python/py-framefilter.c | 33 ++-- gdb/testsuite/ChangeLog | 8 + .../gdb.python/amd64-py-framefilter-invalidarg.S | 261 ++++++++++++++++++++ .../gdb.python/py-framefilter-invalidarg-gdb.py.in | 48 ++++ .../gdb.python/py-framefilter-invalidarg.exp | 67 +++++ .../gdb.python/py-framefilter-invalidarg.py | 59 +++++ 7 files changed, 467 insertions(+), 15 deletions(-) create mode 100644 gdb/testsuite/gdb.python/amd64-py-framefilter-invalidarg.S create mode 100644 gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py.in create mode 100644 gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp create mode 100644 gdb/testsuite/gdb.python/py-framefilter-invalidarg.py -- You are receiving this mail because: You are on the CC list for the bug.