This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c++/29871] New: Allocating 8Mb structure on the stack causes segmentation fault in output program


If the following tiny program is built, the resulting executable will seg fault
upon the construction of a.

class a {
public:
        a() {}
        ~a() {}
        char c[(8*1024*1024)];
};

int main(void) {
        a _a;
    return 0;
}

I've got this to occur in Suse Enterprise 10 32-bit, but got similar results in
open Suse 10.1 64-bit.


-- 
           Summary: Allocating 8Mb structure on the stack causes
                    segmentation fault in output program
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: angus at uducat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29871


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