From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24175 invoked by alias); 3 Oct 2011 14:59:24 -0000 Received: (qmail 24162 invoked by uid 22791); 3 Oct 2011 14:59:23 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 Oct 2011 14:59:09 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2C4622BAB52; Mon, 3 Oct 2011 10:59:09 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id D+trDqMt6WUi; Mon, 3 Oct 2011 10:59:09 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id C56E32BAB5F; Mon, 3 Oct 2011 10:59:08 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 6064D145615; Mon, 3 Oct 2011 10:59:04 -0400 (EDT) Date: Mon, 03 Oct 2011 14:59:00 -0000 From: Joel Brobecker To: Joost van der Sluis Cc: gdb@sourceware.org Subject: Re: Crash of Archer's gdb on mingw (passing null argument to vasprintf) Message-ID: <20111003145904.GK27340@adacore.com> References: <1317634777.28003.15.camel@feddie.cnoc.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1317634777.28003.15.camel@feddie.cnoc.lan> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00005.txt.bz2 > In gdbtypes.c there's this code: > > warning (_("Range for type %s has invalid bounds %s..%s"), > TYPE_NAME (type), plongest (TYPE_LOW_BOUND (range_type)), > plongest (TYPE_HIGH_BOUND (range_type))); > > This goes wrong when TYPE_NAME (type) is null. We should several example of us handling this type of situation. Typically we use: TYPE_NAME (type) ? TYPE_NAME (type) : "" or something like that. -- Joel