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

            Bug ID: 66209
           Summary: Out of memory when compiling with --coverage and
                    optimizations
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: wellnhofer at aevum dot de
  Target Milestone: ---

Created attachment 35570
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35570&action=edit
Problematic source file

Compiling the attached file `scanners.c` with --coverage and -O1 or -O2 results
in:

    $ gcc -O1 --coverage -c scanners.c

    cc1: out of memory allocating 4064 bytes after a total of 2528780288 bytes

I'm using gcc 4.9.1 shipped with Ubuntu 14.10.

The source file contains a single function generated with re2c from the
following input:

// Try to match email autolink after first <, returning num of chars matched.
int _scan_autolink_email(const unsigned char *p)
{
  const unsigned char *marker = NULL;
  const unsigned char *start = p;
/*!re2c
  [a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+
    [@]
    [a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?
    ([.][a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*
    [>] { return (p - start); }
  .? { return 0; }
*/
}

Reply via email to