<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - compiler crash when using large array with sanitizers"
   href="https://bugs.llvm.org/show_bug.cgi?id=52075">52075</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>compiler crash when using large array with sanitizers
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>12.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>k.even-mendoza@imperial.ac.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This code example with -O0 -fsanitize=address:

void c() {
  char e[][(65002)][65002] = {{}, {}, {}, {}, {(6)}, {{}, (6)}};
}
int main() {
  return 0;
}
crashed the compiler (llvm 13 built with msan), with this generic error:

input/setA/3abd6bfec6d4e7b15a96782462b8a08d50355bbf.c
clang-13: error: unable to execute command: Killed
clang-13: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 13.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
2153cad11ba252698c21d48723265ca7f4850a29)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/user42/data/builds_msan_13/llvm-130-build_NO_D_A_memsan/bin
clang-13: note: diagnostic msg:
********************PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-13: note: diagnostic msg:
/tmp/3abd6bfec6d4e7b15a96782462b8a08d50355bbf-e1e531.c
clang-13: note: diagnostic msg:
/tmp/3abd6bfec6d4e7b15a96782462b8a08d50355bbf-e1e531.sh
clang-13: note: diagnostic msg:********************

It happens with llvm 11,12 and 13. 

I would expect an out-of-memory error or a warning regarding the size of the
array during compilation, but the compiler returns a generic error of the
crash. The original program was large, so it was not clear what is the problem
before reducing the program to the small code example here.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>