From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11698 invoked by alias); 4 Mar 2011 00:14:13 -0000 Received: (qmail 11673 invoked by uid 22791); 4 Mar 2011 00:14:08 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ww0-f43.google.com (HELO mail-ww0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Mar 2011 00:14:04 +0000 Received: by wwe15 with SMTP id 15so1608551wwe.12 for ; Thu, 03 Mar 2011 16:14:02 -0800 (PST) Received: by 10.227.144.196 with SMTP id a4mr1516782wbv.122.1299197642448; Thu, 03 Mar 2011 16:14:02 -0800 (PST) Received: from [192.168.2.99] (cpc2-cmbg8-0-0-cust61.5-4.cable.virginmedia.com [82.6.108.62]) by mx.google.com with ESMTPS id w25sm1326458wbd.5.2011.03.03.16.14.00 (version=SSLv3 cipher=OTHER); Thu, 03 Mar 2011 16:14:01 -0800 (PST) Message-ID: <4D702EB6.80308@gmail.com> Date: Fri, 04 Mar 2011 00:14:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Mike Stump CC: Michael Snyder , DJ Delorie , "gcc-patches@gcc.gnu.org" , "gdb-patches@sourceware.org" Subject: Re: [RFA] libiberty/hashtab.c, higher_prime_index: avoid array overrun References: <4D701056.1080208@vmware.com> <201103032211.p23MB9Ed003261@greed.delorie.com> <4D70158A.5080209@vmware.com> <7C3548F1-7F55-4E3A-92F9-A41A82060F34@comcast.net> In-Reply-To: <7C3548F1-7F55-4E3A-92F9-A41A82060F34@comcast.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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-03/txt/msg00239.txt.bz2 On 03/03/2011 23:00, Mike Stump wrote: > On Mar 3, 2011, at 2:26 PM, Michael Snyder wrote: >> DJ Delorie wrote: >>>> As written, the function will access element [30] of a 30-element array. >>> Um, no? >> Y-uh-huh! > > fight fight fight... :-) There can be only one. I was just wondering whether now would be a good time to mention that having prime-sized hash tables is only a workaround against the danger of someone providing an inadequate hash function implementation in the first place? cheers, DaveK