]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/btrace.c
btrace: do not return out of TRY/CATCH
authorMarkus Metzger <markus.t.metzger@intel.com>
Wed, 23 Dec 2015 12:53:53 +0000 (13:53 +0100)
committerMarkus Metzger <markus.t.metzger@intel.com>
Mon, 4 Jan 2016 08:43:39 +0000 (09:43 +0100)
commit43368e1d9ab8437079001f7a5f6ae2241acaece3
tree990ffbd4be2a393cc3779d74b665a704598d4406
parent77cf2ef5dc9099501529151921a73be904757466
btrace: do not return out of TRY/CATCH

In btrace_pt_readmem_callback, we read memory inside TRY/CATCH and return in
case of an error return value.  This corrupts the cleanup chain, which
eventually results in a SEGV when doing or discarding cleanups later on.

gdb/
* btrace.c (btrace_pt_readmem_callback): Do not return in TRY/CATCH.

testsuite/
* gdb.btrace/dlopen.exp: New.
* gdb.btrace/dlopen.c: New.
* gdb.btrace/dlopen-dso.c: New.
gdb/ChangeLog
gdb/btrace.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.btrace/dlopen-dso.c [new file with mode: 0644]
gdb/testsuite/gdb.btrace/dlopen.c [new file with mode: 0644]
gdb/testsuite/gdb.btrace/dlopen.exp [new file with mode: 0644]