This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc patch] nomem: internal_error -> error


> Date: Tue, 1 Jun 2010 18:48:08 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> 
> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]