diff options
author | Pedro Alves <palves@redhat.com> | 2017-07-06 00:19:24 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-07-06 00:19:24 +0100 |
commit | 8455d26243aef72f7b827ec0d8367b6b7816de07 (patch) | |
tree | 93ee5c19c6a006c57d0be94291a6447145611ff6 /gdb/testsuite | |
parent | 1d827a720c9659cc8d54059ccc3efae24b875c03 (diff) | |
download | gdb-8455d26243aef72f7b827ec0d8367b6b7816de07.zip gdb-8455d26243aef72f7b827ec0d8367b6b7816de07.tar.gz gdb-8455d26243aef72f7b827ec0d8367b6b7816de07.tar.bz2 |
Fix Python unwinder frames regression
The gdb.python/py-unwind.exp test is crashing GDB / leaving core dumps
in the test dir, even though it all passes cleanly. The crash is not
visible in gdb.sum/gdb.log because it happens as side effect of the
"quit" command, while flushing the frame cache.
The problem is simply a typo in a 'for' loop's condition, introduced
by a recent change [4fa847d78edd ("Remove MAX_REGISTER_SIZE from
py-unwind.c")], resulting in infinite loop / double-free.
The new test exposes the crash, like:
Running src/gdb/testsuite/gdb.python/py-unwind.exp ...
ERROR: Process no longer exists
gdb/ChangeLog:
2017-07-06 Pedro Alves <palves@redhat.com>
* python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
gdb/testsuite/ChangeLog:
2017-07-06 Pedro Alves <palves@redhat.com>
* gdb.python/py-unwind.exp: Test flushregs.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-unwind.exp | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 6160c4b..d6a7252 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2017-07-06 Pedro Alves <palves@redhat.com> + + * gdb.python/py-unwind.exp: Test flushregs. + 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com> PR cli/21688 diff --git a/gdb/testsuite/gdb.python/py-unwind.exp b/gdb/testsuite/gdb.python/py-unwind.exp index 0a4d34f..625b04c 100644 --- a/gdb/testsuite/gdb.python/py-unwind.exp +++ b/gdb/testsuite/gdb.python/py-unwind.exp @@ -51,4 +51,5 @@ gdb_test_sequence "where" "Backtrace restored by unwinder" { "\\r\\n#2 .* main \\(.*\\) at" } - +# Check that the Python unwinder frames can be flushed / released. +gdb_test "flushregs" "Register cache flushed\\." "flush frames" |