This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Crash regression [Re: [4/5] implement "info vtable"]


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> Crash regression for: gdb.cp/virtfunc.exp
Jan> Expecting due to -lmcheck.
Jan> Reproducible on x86_64-fedora16-linux-gnu.

I'm checking in the appended.
I verified that this fixes it using valgrind.

Tom

2012-03-19  Tom Tromey  <tromey@redhat.com>

	* gnu-v3-abi.c (gnuv3_print_vtable): Initialize 'result_vec'.

diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index 72ca2a1..1095c60 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -907,7 +907,7 @@ gnuv3_print_vtable (struct value *value)
   struct value_print_options opts;
   htab_t offset_hash;
   struct cleanup *cleanup;
-  VEC (value_and_voffset_p) *result_vec;
+  VEC (value_and_voffset_p) *result_vec = NULL;
   struct value_and_voffset *iter;
   int i, count;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]