[llvm-bugs] [Bug 39136] New: Clang crash when compiling buggy code in 7.0
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Oct 1 02:54:31 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=39136
Bug ID: 39136
Summary: Clang crash when compiling buggy code in 7.0
Product: clang
Version: 7.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: james.chicken at xtxmarkets.com
CC: llvm-bugs at lists.llvm.org
Created attachment 20946
--> https://bugs.llvm.org/attachment.cgi?id=20946&action=edit
Stack dump from compiling the excerpt as well as preprocessed source and run
script
When compiling our C++17 codebase I encounter a segmentation fault in clang
7.0. It's when compiling an invalid program admittedly but of course the
compiler should not crash regardless. I ran creduce on the example and it cut
it down to this excerpt:
template <a> qwertyuiopasdfghjklz;
template b()->qwertyuiopasdfghjklz<>;
The length of symbol 'qwertyuiopasdfghjklz' is actually important for the
crash. I found I cannot reproduce with a token shorter than above, but that
length or larger causes the crash.
I have attached the output I get when attempting to compile the excerpt, as
well as the preprocessed source and associated run script.
We build clang like this (tl;dr build from source using gcc 8.2):
export LINK_FLAGS="-Wl,-rpath,/gcc-8.2/lib64 -L/gcc-8.2/lib64"
cmake \
-G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=/home/jchicke/clang-7 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_SHARED_LINKER_FLAGS=$LINK_FLAGS \
-DCMAKE_MODULE_LINKER_FLAGS=$LINK_FLAGS \
-DCMAKE_EXE_LINKER_FLAGS=$LINK_FLAGS \
-DCMAKE_C_LINK_FLAGS=$LINK_FLAGS \
-DLLVM_OPTIMIZED_TABLEGEN=On \
-DLLVM_BINUTILS_INCDIR=/gcc-8.2/include \
../src
Any more info you need please ask.
--
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/20181001/129e8913/attachment.html>
More information about the llvm-bugs
mailing list