[llvm-bugs] [Bug 31499] New: NewGVN cause clang to crash when compiling OpenCOLLADA
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Dec 30 15:19:49 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=31499
Bug ID: 31499
Summary: NewGVN cause clang to crash when compiling OpenCOLLADA
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: lukebenes at hotmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 17793
--> https://llvm.org/bugs/attachment.cgi?id=17793&action=edit
.cpp reproducer
When building OpenCOLLADA from
https://github.com/KhronosGroup/OpenCOLLADA/tree/master/COLLADABaseUtils
clang crashes with the NewGVN. The following is the console output:
#0 0x0000559e7e7b97c8 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/bin/clang-4.0+0x1b6b7c8)
#1 0x0000559e7e7b76ee llvm::sys::RunSignalHandlers()
(/usr/local/bin/clang-4.0+0x1b696ee)
#2 0x0000559e7e7b782a SignalHandler(int) (/usr/local/bin/clang-4.0+0x1b6982a)
#3 0x00002b108c332630 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11630)
#4 0x0000559e7e6c5ba4 NewGVN::createLoadExpression(llvm::Type*, llvm::Value*,
llvm::LoadInst*, llvm::MemoryAccess*, llvm::BasicBlock const*)
(/usr/local/bin/clang-4.0+0x1a77ba4)
#5 0x0000559e7e6cd2d5 NewGVN::valueNumberInstruction(llvm::Instruction*)
(/usr/local/bin/clang-4.0+0x1a7f2d5)
#6 0x0000559e7e6cfd88 NewGVN::runGVN(llvm::Function&, llvm::DominatorTree*,
llvm::AssumptionCache*, llvm::TargetLibraryInfo*, llvm::AAResults*,
llvm::MemorySSA*) (/usr/local/bin/clang-4.0+0x1a81d88)
#7 0x0000559e7e6d03d0 NewGVN::runOnFunction(llvm::Function&)
(/usr/local/bin/clang-4.0+0x1a823d0)
#8 0x0000559e7e39b9e2 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/local/bin/clang-4.0+0x174d9e2)
#9 0x0000559e7f0fd69f (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&)
(/usr/local/bin/clang-4.0+0x24af69f)
#10 0x0000559e7e39c434 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/bin/clang-4.0+0x174e434)
#11 0x0000559e7e9465ef clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/usr/local/bin/clang-4.0+0x1cf85ef)
#12 0x0000559e7ef4be8a
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/bin/clang-4.0+0x22fde8a)
#13 0x0000559e7f2e8998 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/bin/clang-4.0+0x269a998)
#14 0x0000559e7ec7753e clang::FrontendAction::Execute()
(/usr/local/bin/clang-4.0+0x202953e)
#15 0x0000559e7ec48676
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/bin/clang-4.0+0x1ffa676)
#16 0x0000559e7ecfd0a2
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/bin/clang-4.0+0x20af0a2)
#17 0x0000559e7d5a0b40 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/bin/clang-4.0+0x952b40)
#18 0x0000559e7d52d702 main (/usr/local/bin/clang-4.0+0x8df702)
#19 0x00002b108d2253f1 __libc_start_main
/build/glibc-jxM2Ev/glibc-2.24/csu/../csu/libc-start.c:325:0
#20 0x0000559e7d59e9ea _start (/usr/local/bin/clang-4.0+0x9509ea)
Stack dump:
0. Program arguments: /usr/local/bin/clang-4.0 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name COLLADABUURI.cpp -mrelocation-model pic
-pic-level 2 -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb
-coverage-notes-file
/workdir/GenCxxObject/UnpackedTarball/opencollada/COLLADABaseUtils/src/COLLADABUURI.gcno
-resource-dir /usr/local/bin/../lib/clang/4.0.0 -dependency-file
/workdir/Dep/GenCxxObject/UnpackedTarball/opencollada/COLLADABaseUtils/src/COLLADABUURI.d_
-MP -MT
/workdir/GenCxxObject/UnpackedTarball/opencollada/COLLADABaseUtils/src/COLLADABUURI.o
-isystem /usr/include/libxml2 -D BOOST_ERROR_CODE_HEADER_ONLY -D
BOOST_SYSTEM_NO_DEPRECATED -D CPPU_ENV=gcc3 -D LINUX -D NDEBUG -D OPTIMIZE -D
OSL_DEBUG_LEVEL=0 -D UNIX -D UNX -D X86_64 -D _PTHREADS -D _REENTRANT -D
SYSTEM_LIBXML -D GENERATEDSAXPARSER_XMLPARSER_LIBXML -D
GENERATEDSAXPARSER_VALIDATION -D PCRE_STATIC -D EXCEPTIONS_ON -D
LIBO_INTERNAL_ONLY -I /COLLADABaseUtils/src/ -I /COLLADABaseUtils/include -I
/COLLADABaseUtils/include/Math -I /COLLADAFramework/include -I
/COLLADASaxFrameworkLoader/include -I
/COLLADASaxFrameworkLoader/include/generated14 -I
/COLLADASaxFrameworkLoader/include/generated15 -I
/Externals/MathMLSolver/include -I /Externals/MathMLSolver/include/AST -I
/Externals/UTF/include -I /GeneratedSaxParser/include -I /include -I
/usr/lib/jvm/java-8-openjdk-amd64/include -I
/usr/lib/jvm/java-8-openjdk-amd64/include/linux -I /config_host -I
/Externals/pcre/include -I /Externals/UTF/include -I
/Externals/MathMLSolver/include -I /Externals/MathMLSolver/include/AST
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/c++/6.2.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/x86_64-linux-gnu/c++/6.2.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/x86_64-linux-gnu/c++/6.2.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/6.2.0/../../../../include/c++/6.2.0/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/local/bin/../lib/clang/4.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O2 -Wall -Wno-missing-braces
-Wnon-virtual-dtor -Wendif-labels -Wextra -Wundef -Wunused-macros
-Wimplicit-fallthrough -Wshadow -Woverloaded-virtual -w -std=gnu++11
-fdeprecated-macro -fdebug-compilation-dir -ferror-limit 19 -fmessage-length 0
-fvisibility hidden -fvisibility-inlines-hidden -stack-protector 2
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fno-common
-fdiagnostics-show-option -vectorize-loops -vectorize-slp -mllvm -enable-newgvn
-o
/workdir/GenCxxObject/UnpackedTarball/opencollada/COLLADABaseUtils/src/COLLADABUURI.o
-x c++ /COLLADABaseUtils/src/COLLADABUURI.cpp
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module
'/COLLADABaseUtils/src/COLLADABUURI.cpp'.
4. Running pass 'Global Value Numbering' on function
'@_ZN9COLLADABU3URI16normalizeURIPathEPc'
clang-4.0: error: unable to execute command: Segmentation fault (core dumped)
clang-4.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 4.0.0 (trunk 290764)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-4.0: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-4.0: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-4.0: note: diagnostic msg: /tmp/COLLADABUURI-26d1f2.cpp
clang-4.0: note: diagnostic msg: /tmp/COLLADABUURI-26d1f2.sh
--
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/20161230/f343179c/attachment.html>
More information about the llvm-bugs
mailing list