From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10792 invoked by alias); 19 Mar 2012 18:13:33 -0000 Received: (qmail 10784 invoked by uid 22791); 19 Mar 2012 18:13:31 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Mar 2012 18:13:05 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2JID514002359 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 19 Mar 2012 14:13:05 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2JID3q2009074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 19 Mar 2012 14:13:04 -0400 From: Tom Tromey To: Jan Kratochvil Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: Crash regression [Re: [4/5] implement "info vtable"] References: <87mx82prmd.fsf@fleche.redhat.com> <4F4F8D39.60507@redhat.com> <874ntpdg5s.fsf@fleche.redhat.com> <20120316081005.GA17525@host2.jankratochvil.net> Date: Mon, 19 Mar 2012 18:13:00 -0000 In-Reply-To: <20120316081005.GA17525@host2.jankratochvil.net> (Jan Kratochvil's message of "Fri, 16 Mar 2012 09:10:05 +0100") Message-ID: <87bonsmpcg.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00716.txt.bz2 >>>>> "Jan" == Jan Kratochvil 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 * 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;