From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32032 invoked by alias); 5 Jul 2011 16:26:17 -0000 Received: (qmail 31590 invoked by uid 22791); 5 Jul 2011 16:26:13 -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; Tue, 05 Jul 2011 16:25:54 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p65GPT0a014966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 5 Jul 2011 12:25:29 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p65GPSIC008809; Tue, 5 Jul 2011 12:25:28 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p65GPQra002470; Tue, 5 Jul 2011 12:25:27 -0400 From: Tom Tromey To: Fawzi Mohamed Cc: gdb-patches@sourceware.org, ext Tristan Gingold , =?utf-8?B?QW5kcsOpIFDDtm5pdHo=?= Subject: Re: [PATCH,gdb]: ensures that cie ptr of an fda is a cie References: Date: Tue, 05 Jul 2011 16:26:00 -0000 In-Reply-To: (Fawzi Mohamed's message of "Mon, 4 Jul 2011 20:11:31 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (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: 2011-07/txt/msg00155.txt.bz2 >>>>> "Fawzi" == Fawzi Mohamed writes: Fawzi> +enum eh_frame_type { Fawzi> + eh_cie_type_id = 1, Fawzi> + eh_fde_type_id = 2, Fawzi> + eh_cie_or_fde_type_id = 3 I think enum constant names should be all caps. That is the usual style. Fawzi> + gdb_assert ((entry_type & eh_cie_type_id)!=0); It seems to me that this code is attempting to validate user input. If so, an assertion is incorrect -- instead it should call either error or warning and in the latter case also arrange for the bad data to be ignored. Tom