From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4573 invoked by alias); 10 Aug 2010 23:15:47 -0000 Received: (qmail 4563 invoked by uid 22791); 10 Aug 2010 23:15:47 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from slice-1.puremagic.com (HELO mail.puremagic.com) (173.45.241.208) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Aug 2010 23:15:42 +0000 Received: from slice-2.puremagic.com (slice-2.puremagic.com [173.45.231.2]) by mail.puremagic.com (8.14.3/8.14.3/Debian-9ubuntu1) with ESMTP id o7ANFSHg031689; Tue, 10 Aug 2010 16:15:29 -0700 Received: by slice-2.puremagic.com (Postfix, from userid 1000) id 9697944103; Tue, 10 Aug 2010 23:15:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by slice-2.puremagic.com (Postfix) with ESMTP id 92AFA440E3; Tue, 10 Aug 2010 16:15:28 -0700 (PDT) Date: Tue, 10 Aug 2010 23:15:00 -0000 From: Brad Roberts To: Tom Tromey cc: gdb-patches@sourceware.org Subject: Re: patch for crash in d-lang.c's demangler In-Reply-To: Message-ID: References: <4C55E1CE.5000301@puremagic.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) 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: 2010-08/txt/msg00135.txt.bz2 On Tue, 10 Aug 2010, Tom Tromey wrote: > >>>>> "Brad" == Brad Roberts writes: > > I think your patch is reasonable, but the line just after your change is > weird: > > > if (i <= 0 && strlen (mangled_str) < i) > > return 0; > > I don't think that condition can ever be true. Agreed. Your patch looks good. I feel guilty about not contributing a unit test to cover this case, so I shouldn't poke you about not adding one either, but if you feel like feeling that guilty... :) Thanks, Brad