public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug python/17355] Crash on Python frame filters with unreadable arg
Date: Sun, 07 Sep 2014 12:13:00 -0000	[thread overview]
Message-ID: <bug-17355-4717-6jjbuNGmAM@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-17355-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=17355

--- Comment #2 from cvs-commit at gcc dot gnu.org <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, master has been updated
       via  c75bd3a23915c3122070a95e1974e323543ffbe4 (commit)
      from  3f9d8762a4b24873f22197d004a8710e9a8557ca (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=c75bd3a23915c3122070a95e1974e323543ffbe4

commit c75bd3a23915c3122070a95e1974e323543ffbe4
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
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.


  parent reply	other threads:[~2014-09-07 12:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-07 12:09 [Bug python/17355] New: " jan.kratochvil at redhat dot com
2014-09-07 12:09 ` [Bug python/17355] " jan.kratochvil at redhat dot com
2014-09-07 12:13 ` cvs-commit at gcc dot gnu.org [this message]
2014-09-07 12:20 ` jan.kratochvil at redhat dot com
2014-09-07 12:23 ` cvs-commit at gcc dot gnu.org

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-17355-4717-6jjbuNGmAM@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).