[llvm-bugs] [Bug 36055] New: Reproducible Clang crash + strongly suspected invalid code generation

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 23 03:04:41 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36055

            Bug ID: 36055
           Summary: Reproducible Clang crash + strongly suspected invalid
                    code generation
           Product: clang
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sergey.ignatchenko at ithare.com
                CC: llvm-bugs at lists.llvm.org

--- 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
http://developer.apple.com/bugreporter/ 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.

-- 
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/20180123/f84ae2f4/attachment-0001.html>


More information about the llvm-bugs mailing list