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++/79362] New: internal compiler error: Segmentation fault - mmap: Cannot allocate memory


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79362

            Bug ID: 79362
           Summary: internal compiler error: Segmentation fault - mmap:
                    Cannot allocate memory
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: falemagn at gmail dot com
  Target Milestone: ---

I cannot reproduce the bug locally, so I cannot provide more details, but it
does happen on godbolt where I was experimenting with the adherence to the
standard of various compilers.

This is the code that fails:

    struct Base {
    };

    struct Derived: Base { 
        using Base::Base;

        Derived(int value):
                m_value(value)
        {}

        int m_value;
    };

    Derived t;

The error given reads like this:

    <source>:14:9: internal compiler error: Segmentation fault
    Derived t;
    ^
    mmap: Cannot allocate memory

Locally, I've traced the compiler with the massif valgrind's tool, but the
maximum amount of memory allocated was at around 1MiB.


You can check gcc7 output on godbolt at this link: https://godbolt.org/g/FnyE9N

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