From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 595 invoked by alias); 1 Jun 2010 17:56:19 -0000 Received: (qmail 585 invoked by uid 22791); 1 Jun 2010 17:56:18 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Jun 2010 17:56:02 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id o51Htgli007506; Tue, 1 Jun 2010 19:55:42 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id o51HtepM012252; Tue, 1 Jun 2010 19:55:40 +0200 (CEST) Date: Tue, 01 Jun 2010 17:56:00 -0000 Message-Id: <201006011755.o51HtepM012252@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: jan.kratochvil@redhat.com CC: gdb-patches@sourceware.org In-reply-to: <20100601164808.GA22487@host0.dyn.jankratochvil.net> (message from Jan Kratochvil on Tue, 1 Jun 2010 18:48:08 +0200) Subject: Re: [rfc patch] nomem: internal_error -> error References: <20100601164808.GA22487@host0.dyn.jankratochvil.net> 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-06/txt/msg00008.txt.bz2 > Date: Tue, 1 Jun 2010 18:48:08 +0200 > From: Jan Kratochvil > > Hi, > > unfortunately I see this problem reproducible only with the > archer-jankratochvil-vla branch (VLA = Variable Length Arrays - char[var]). > OTOH this branch I hopefully submit in some form for FSF GDB later. > > In this case (a general problem but tested for example on Fedora 13 i686): > > int > main (int argc, char **argv) > { > char a[argc]; > return a[0]; > } > > (gdb) start > (gdb) print a > ../../gdb/utils.c:1251: internal-error: virtual memory exhausted: can't allocate 4294951689 bytes. > > I find simple error as a perfectly reasonable there. I disagree; this internal-error really is a bug in GDB. We should never try to allocate that much memory.