<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 - Reproducible Clang crash + strongly suspected invalid code generation"
   href="https://bugs.llvm.org/show_bug.cgi?id=36055">36055</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Reproducible Clang crash + strongly suspected invalid code generation
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>sergey.ignatchenko@ithare.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>--- 1. Command-line which caused the crash and output:

gcc -DITHARE_OBF_SEED=0xbcef7cc0201ec100 -DITHARE_OBF_SEED2=0x0ec20b00a6b0f5ee
-DITHARE_OBF_INIT -DITHARE_OBF_CONSISTENT_XPLATFORM_IMPLICIT_SEEDS
-DITHARE_OBF_DBG_RUNTIME_CHECKS -o obftemp -std=c++1z -lstdc++ -Werror -g
../official.cpp
clang: error: unable to execute command: Killed: 9
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://developer.apple.com/bugreporter/">http://developer.apple.com/bugreporter/</a> and include the crash backtrace,
preprocessed source, and associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg:
/var/folders/28/484cmxmd5g7dzh3jd2fkhvfw0000gn/T/official-cc1d9a.cpp
clang: note: diagnostic msg:
/var/folders/28/484cmxmd5g7dzh3jd2fkhvfw0000gn/T/official-cc1d9a.sh
clang: note: diagnostic msg: Crash backtrace is located in
clang: note: diagnostic msg:
/Users/nemo/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang: note: diagnostic msg: (choose the .crash file that corresponds to your
crash)
clang: note: diagnostic msg: 

-------------------

NOTES: 
- .cpp and .sh are attached
- no crash backtrace was created
- #defines in command-line are of CRITICAL importance; in general, ANY change
to the parameters will lead to VERY different results.
- don't ask why the source is written like this - there are other reasons to
write it, but apparently it happens to be a very good open-source tool to
torture compiler :-). 

--- 2. IF changing command line above, keeping it almost-the-same but removing
'-g' option, the code will compile, but resulting Mac OS X executable will
crash with segfault (only with these #defines, with ~10'000 other random
#defines it was ok). There is a strong suspicion that this is a manifestation
of a code generation bug in Clang (there are very few pointers in the whole
program - except for occasional type punning, and it is very difficult to get a
segfault there); of course, technically speaking, there is always  a chance
that there is some UB which manifests like this - but combined with the Clang
crashing with almost-exactly the same command line - chances are that it is a
manifestation of the same bug in Clang.</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>