This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/53452] New: large array problem x86_64
- From: "peter.faasse at nlr dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 May 2012 12:59:45 +0000
- Subject: [Bug c/53452] New: large array problem x86_64
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53452
Bug #: 53452
Summary: large array problem x86_64
Classification: Unclassified
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: peter.faasse@nlr.nl
Created attachment 27475
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27475
per-request, the .i file, command-line file will follow
The following very simple program:
--------------------------------------------------------
int main(int argc, char *argv[])
{
//
int ttt[1073741824]; // fails --> segmentation fault
//int ttt[1048576]; // ok
//
return 0;
//
}
--------------------------------------------------------
segfaults when an array of 1Gig ints is declared.
In gdb that shows up as:
--------------------------------------------------------
(gdb) b main
Breakpoint 1 at 0x4004d0: file test.c, line 7.
(gdb) r
Starting program: /home/prf/z08/ALL/DSC/test/test
Program received signal SIGSEGV, Segmentation fault.
0x00000000004004bc in main (argc=Cannot access memory at address 0xfffeffffc99c
) at test.c:2
2 {
--------------------------------------------------------