From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12248 invoked by alias); 10 Nov 2008 20:57:35 -0000 Received: (qmail 12216 invoked by uid 22791); 10 Nov 2008 20:57:35 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 10 Nov 2008 20:56:49 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mAAKqlqx023829; Mon, 10 Nov 2008 15:52:47 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mAAKqk7H009215; Mon, 10 Nov 2008 15:52:46 -0500 Received: from opsy.redhat.com (vpn-13-202.rdu.redhat.com [10.11.13.202]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mAAKqjiQ001474; Mon, 10 Nov 2008 15:52:45 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 3CF8E3786D6; Mon, 10 Nov 2008 13:52:44 -0700 (MST) To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: RFA: fix crash-causing bug in copy_type_recursive References: <200811102046.13626.pedro@codesourcery.com> From: Tom Tromey Reply-To: Tom Tromey X-Attribution: Tom Date: Mon, 10 Nov 2008 21:26:00 -0000 In-Reply-To: <200811102046.13626.pedro@codesourcery.com> (Pedro Alves's message of "Mon\, 10 Nov 2008 20\:46\:13 +0000") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2008-11/txt/msg00198.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: >> + memset (TYPE_FIELDS (new_type), 0, sizeof (struct field) * nfields); Pedro> Or xzalloc, or xcalloc, or XCALLOC even. I would have done this, but all other initializations of this field use xmalloc + memset. So, I opted for consistency. Tom