From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4015 invoked by alias); 15 Sep 2009 20:43:23 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 3991 invoked by uid 22791); 15 Sep 2009 20:43:22 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org From: Tom Tromey To: Phil Muldoon Cc: Project Archer Subject: Re: [patch] Do not allow invalid subscript operations on GDB values References: <4AAF6528.6040504@redhat.com> Reply-To: Tom Tromey Date: Tue, 15 Sep 2009 20:43:00 -0000 In-Reply-To: <4AAF6528.6040504@redhat.com> (Phil Muldoon's message of "Tue, 15 Sep 2009 10:58:00 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2009-q3/txt/msg00218.txt.bz2 >>>>> "Phil" == Phil Muldoon writes: Phil> + /* Check the value's type is something that can be accessed via Phil> + a subscript. */ Phil> + struct type *type = check_typedef (value_type (tmp)); I see eval.c also uses coerce_ref here. So, I wonder if this works properly with a value of type reference-to-array or reference-to-pointer. Could you try that? If that fails, please add the call and commit it. If it works, it is ok as-is, so please commit it. Also, please submit the final patch upstream. thanks, Tom