[llvm-bugs] [Bug 52166] New: LLVM ERROR: out of memory for very large .c files

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 13 09:07:23 PDT 2021


            Bug ID: 52166
           Summary: LLVM ERROR: out of memory for very large .c files
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: andrei.roventa at windriver.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Created attachment 25360
  --> https://bugs.llvm.org/attachment.cgi?id=25360&action=edit
stack dump

The following failure is seen frequently (but cannot be reproduced
consistently) for some large files: "LLVM ERROR: out of memory".

The build machine has over 32GB or RAM and most of the time it shows that more
than 20GB are free when these failures occur.

These large files where such failure occur, each has a single very large array
used in testing of the form:

unsigned char pSource13[] =
{ 0x50, 0x4e, 0x6b, 0x57, 0x30, 0x71, 0x33, 0x59, 0x49, 0x31, 0x30, 0x30, ....
0x68, 0x36, 0x71, 0x55, 0x31, 0x66, 0x48, 0x54, 0x51, 0x58, 0x30, 0x3e, 0x55,
0x56, 0x53, 0x47 };

Attached are some of the trace files for this. I cannot attach the source file
as it is extremely large (more than 150MB), but a trimmed down version was
added for reference.

LLVM ERROR: out of memory
Stack dump:
0.      Program arguments:
-fno-builtin --target=arm64 -ffixed-x18 -mfix-cortex-a53-835769 -std=c11
-D__vxworks -D__VXWORKS__ -D__ELF__ -D_HAVE_TOOL_XTORS -nostdlibinc -nostdinc++
-ftls-model=local-exec -fno-builtin -fno-strict-aliasing -D_USE_INIT_ARRAY
-finline-hint-functions -mllvm -inline-threshold=0 -fno-exceptions -D_NO_EX
-fno-rtti -D_NO_RTTI -mno-implicit-float -g -O2 -Wall -Wconversion
-Wno-sign-conversion -DCPU=_VX_ARMARCH8A -DTOOL_FAMILY=llvm -DTOOL=llvm
-I. -MD -c -o
1.      zlib_25MB_unique_srting_TC19_in.c:568001:49: current parser token ','
clang: error: clang frontend command failed due to signal (use -v to see
clang version (http://gitlab.devstar.cloud/compilers/llvm/clang.git
5449acbaec3d4a4a4cf80bc0bbfd17270fce7bcb) (llvm/llvm.git
Target: arm64
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang: note: diagnostic msg: 

Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/zlib_25MB_unique_srting_TC19_in-29a3fb.c
clang: note: diagnostic msg: /tmp/zlib_25MB_unique_srting_TC19_in-29a3fb.sh
clang: note: diagnostic msg:

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211013/4af787a2/attachment.html>

More information about the llvm-bugs mailing list