[llvm-bugs] [Bug 39366] New: LLVM IR generation of compound statement ('{}') crash

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Oct 20 02:58:43 PDT 2018


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

            Bug ID: 39366
           Summary: LLVM IR generation of compound statement ('{}') crash
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: lebedev.ri at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 21022
  --> https://bugs.llvm.org/attachment.cgi?id=21022&action=edit
/tmp/VC5Decompressor-3e2f2e.cpp

[1/3 0.2/sec] Building CXX object
src/CMakeFiles/rawspeed.dir/librawspeed/decompressors/VC5Decompressor.cpp.o
FAILED:
src/CMakeFiles/rawspeed.dir/librawspeed/decompressors/VC5Decompressor.cpp.o 
/usr/bin/cmake -E __run_co_compile --tidy=/usr/local/bin/clang-tidy
--source=../src/librawspeed/decompressors/VC5Decompressor.cpp --
/usr/local/bin/clang++  -DDEBUG -D_GLIBCXX_SANITIZE_VECTOR -Isrc
-I../src/librawspeed -isystem ../src/external -std=c++14 -Wall -Wextra
-Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-conversion
-Wno-covered-switch-default -Wno-deprecated -Wno-double-promotion
-Wno-exit-time-destructors -Wno-global-constructors
-Wno-gnu-zero-variadic-macro-arguments -Wno-old-style-cast -Wno-padded
-Wno-switch-enum -Wno-unused-macros -Wno-unused-parameter -Wno-weak-vtables
-Wno-zero-as-null-pointer-constant -Wextra-semi -O3 -fno-optimize-sibling-calls
-fsanitize=address -fno-omit-frame-pointer -fno-common -U_FORTIFY_SOURCE
-fsanitize-address-use-after-scope -fsanitize=undefined
-fno-sanitize-recover=undefined -fsanitize=integer
-fno-sanitize-recover=integer -fPIC   -march=native -g3 -ggdb3 -Werror -pthread
-fopenmp=libomp -std=c++14 -MD -MT
src/CMakeFiles/rawspeed.dir/librawspeed/decompressors/VC5Decompressor.cpp.o -MF
src/CMakeFiles/rawspeed.dir/librawspeed/decompressors/VC5Decompressor.cpp.o.d
-o src/CMakeFiles/rawspeed.dir/librawspeed/decompressors/VC5Decompressor.cpp.o
-c ../src/librawspeed/decompressors/VC5Decompressor.cpp
Stack dump:
0.      Program arguments: /usr/lib/llvm-8/bin/clang -cc1 -triple
x86_64-pc-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name VC5Decompressor.cpp -mrelocation-model pic
-pic-level 2 -mthread-model posix -mdisable-fp-elim -mdisable-tail-calls
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu bdver2 -target-feature +sse2 -target-feature +cx16
-target-feature +sahf -target-feature +tbm -target-feature -avx512ifma
-target-feature -sha -target-feature -gfni -target-feature +fma4
-target-feature -vpclmulqdq -target-feature +prfchw -target-feature -bmi2
-target-feature -cldemote -target-feature -fsgsbase -target-feature -ptwrite
-target-feature -xsavec -target-feature +popcnt -target-feature +aes
-target-feature -avx512bitalg -target-feature -movdiri -target-feature -xsaves
-target-feature -avx512er -target-feature -avx512vnni -target-feature
-avx512vpopcntdq -target-feature -pconfig -target-feature -clwb -target-feature
-avx512f -target-feature -clzero -target-feature -pku -target-feature +mmx
-target-feature -lwp -target-feature -rdpid -target-feature +xop
-target-feature -rdseed -target-feature -waitpkg -target-feature -movdir64b
-target-feature +sse4a -target-feature -avx512bw -target-feature -clflushopt
-target-feature +xsave -target-feature -avx512vbmi2 -target-feature +64bit
-target-feature -avx512vl -target-feature -invpcid -target-feature -avx512cd
-target-feature +avx -target-feature -vaes -target-feature -rtm -target-feature
+fma -target-feature +bmi -target-feature -rdrnd -target-feature -mwaitx
-target-feature +sse4.1 -target-feature +sse4.2 -target-feature -avx2
-target-feature -wbnoinvd -target-feature +sse -target-feature +lzcnt
-target-feature +pclmul -target-feature -prefetchwt1 -target-feature +f16c
-target-feature +ssse3 -target-feature -sgx -target-feature -shstk
-target-feature +cmov -target-feature -avx512vbmi -target-feature -movbe
-target-feature -xsaveopt -target-feature -avx512dq -target-feature -adx
-target-feature -avx512pf -target-feature +sse3 -dwarf-column-info
-debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb
-momit-leaf-frame-pointer -coverage-notes-file
/home/lebedevri/rawspeed/build-Clang-SANITIZE/src/CMakeFiles/rawspeed.dir/librawspeed/decompressors/VC5Decompressor.cpp.gcno
-resource-dir /usr/lib/llvm-8/lib/clang/8.0.0 -dependency-file
src/CMakeFiles/rawspeed.dir/librawspeed/decompressors/VC5Decompressor.cpp.o.d
-sys-header-deps -MT
src/CMakeFiles/rawspeed.dir/librawspeed/decompressors/VC5Decompressor.cpp.o
-isystem ../src/external -D DEBUG -D _GLIBCXX_SANITIZE_VECTOR -I src -I
../src/librawspeed -U _FORTIFY_SOURCE -internal-isystem
/usr/lib64/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 -internal-isystem
/usr/lib64/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8
-internal-isystem
/usr/lib64/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8
-internal-isystem
/usr/lib64/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward
-internal-isystem /usr/include/clang/8.0.0/include/ -internal-isystem
/usr/local/include -internal-isystem /usr/lib/llvm-8/lib/clang/8.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-Wall -Wextra -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic
-Wno-conversion -Wno-covered-switch-default -Wno-deprecated
-Wno-double-promotion -Wno-exit-time-destructors -Wno-global-constructors
-Wno-gnu-zero-variadic-macro-arguments -Wno-old-style-cast -Wno-padded
-Wno-switch-enum -Wno-unused-macros -Wno-unused-parameter -Wno-weak-vtables
-Wno-zero-as-null-pointer-constant -Wextra-semi -Werror -std=c++14
-fdebug-compilation-dir /home/lebedevri/rawspeed/build-Clang-SANITIZE
-ferror-limit 19 -fmessage-length 0 -fopenmp
-fsanitize=address,alignment,array-bounds,bool,builtin,enum,float-cast-overflow,float-divide-by-zero,function,integer-divide-by-zero,nonnull-attribute,null,object-size,pointer-overflow,return,returns-nonnull-attribute,shift-base,shift-exponent,signed-integer-overflow,unreachable,vla-bound,vptr,unsigned-integer-overflow,implicit-integer-truncation
-fsanitize-blacklist=/usr/lib/llvm-8/lib/clang/8.0.0/share/asan_blacklist.txt
-fsanitize-address-use-after-scope -fno-assume-sane-operator-new -pthread
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fno-common
-fdiagnostics-show-option -vectorize-loops -vectorize-slp -o
src/CMakeFiles/rawspeed.dir/librawspeed/decompressors/VC5Decompressor.cpp.o -x
c++ ../src/librawspeed/decompressors/VC5Decompressor.cpp -faddrsig 
1.      <eof> parser at end of file
2.      ../src/librawspeed/decompressors/VC5Decompressor.cpp:63:11: LLVM IR
generation of declaration 'rawspeed'
3.      ../src/librawspeed/decompressors/VC5Decompressor.cpp:589:23: Generating
code for declaration 'rawspeed::VC5Decompressor::decode'
4.      ../src/librawspeed/decompressors/VC5Decompressor.cpp:625:3: LLVM IR
generation of compound statement ('{}')
5.      ../src/librawspeed/decompressors/VC5Decompressor.cpp:632:71: LLVM IR
generation of compound statement ('{}')
#0 0x00007eff636c9bba llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/lib/llvm-8/bin/../lib/libLLVM-8.so.1+0xa51bba)
#1 0x00007eff636c8254 llvm::sys::RunSignalHandlers()
(/usr/lib/llvm-8/bin/../lib/libLLVM-8.so.1+0xa50254)
#2 0x00007eff636c83b5 (/usr/lib/llvm-8/bin/../lib/libLLVM-8.so.1+0xa503b5)
#3 0x00007eff66d3a8e0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x128e0)
#4 0x00005556b4eb28e5
clang::CodeGen::CodeGenFunction::EmitLValueForField(clang::CodeGen::LValue,
clang::FieldDecl const*) (/usr/lib/llvm-8/bin/clang+0x6e48e5)
#5 0x00005556b4f69844 (/usr/lib/llvm-8/bin/clang+0x79b844)
#6 0x00005556b4f7a62e
clang::CodeGen::CGOpenMPRuntime::emitTaskInit(clang::CodeGen::CodeGenFunction&,
clang::SourceLocation, clang::OMPExecutableDirective const&, llvm::Value*,
clang::QualType, clang::CodeGen::Address, clang::CodeGen::OMPTaskDataTy const&)
(/usr/lib/llvm-8/bin/clang+0x7ac62e)
#7 0x00005556b4f7b432
clang::CodeGen::CGOpenMPRuntime::emitTaskCall(clang::CodeGen::CodeGenFunction&,
clang::SourceLocation, clang::OMPExecutableDirective const&, llvm::Value*,
clang::QualType, clang::CodeGen::Address, clang::Expr const*,
clang::CodeGen::OMPTaskDataTy const&) (/usr/lib/llvm-8/bin/clang+0x7ad432)
#8 0x00005556b4cf4199 (/usr/lib/llvm-8/bin/clang+0x526199)
#9 0x00005556b4d13421
clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(clang::OMPExecutableDirective
const&, clang::OpenMPDirectiveKind, clang::CodeGen::RegionCodeGenTy const&,
llvm::function_ref<void (clang::CodeGen::CodeGenFunction&, llvm::Value*,
clang::CodeGen::OMPTaskDataTy const&)> const&, clang::CodeGen::OMPTaskDataTy&)
(/usr/lib/llvm-8/bin/clang+0x545421)
#10 0x00005556b4d144e5
clang::CodeGen::CodeGenFunction::EmitOMPTaskDirective(clang::OMPTaskDirective
const&) (/usr/lib/llvm-8/bin/clang+0x5464e5)
#11 0x00005556b4cefbd4 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
(/usr/lib/llvm-8/bin/clang+0x521bd4)
#12 0x00005556b4cefda3
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot)
(/usr/lib/llvm-8/bin/clang+0x521da3)
#13 0x00005556b4cf0018
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) (/usr/lib/llvm-8/bin/clang+0x522018)
#14 0x00005556b4cf31b3
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*)
(/usr/lib/llvm-8/bin/clang+0x5251b3)
#15 0x00005556b4cef780 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
(/usr/lib/llvm-8/bin/clang+0x521780)
#16 0x00005556b4cf18e9
clang::CodeGen::CodeGenFunction::EmitForStmt(clang::ForStmt const&,
llvm::ArrayRef<clang::Attr const*>) (/usr/lib/llvm-8/bin/clang+0x5238e9)
#17 0x00005556b4cefa2e clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
(/usr/lib/llvm-8/bin/clang+0x521a2e)
#18 0x00005556b4cfeb13 (/usr/lib/llvm-8/bin/clang+0x530b13)
#19 0x00005556b4f55f59
clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&)
const (/usr/lib/llvm-8/bin/clang+0x787f59)
#20 0x00005556b4f55fef (/usr/lib/llvm-8/bin/clang+0x787fef)
#21 0x00005556b4f5492b
clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(clang::CodeGen::CodeGenFunction&,
clang::OpenMPDirectiveKind, clang::CodeGen::RegionCodeGenTy const&, bool)
(/usr/lib/llvm-8/bin/clang+0x78692b)
#22 0x00005556b4f71cb8
clang::CodeGen::CGOpenMPRuntime::emitTaskgroupRegion(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::RegionCodeGenTy const&, clang::SourceLocation)
(/usr/lib/llvm-8/bin/clang+0x7a3cb8)
#23 0x00005556b4d06587
clang::CodeGen::CodeGenFunction::EmitOMPTaskgroupDirective(clang::OMPTaskgroupDirective
const&) (/usr/lib/llvm-8/bin/clang+0x538587)
#24 0x00005556b4cefbc4 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
(/usr/lib/llvm-8/bin/clang+0x521bc4)
#25 0x00005556b4d0c427 (/usr/lib/llvm-8/bin/clang+0x53e427)
#26 0x00005556b4f55f59
clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&)
const (/usr/lib/llvm-8/bin/clang+0x787f59)
#27 0x00005556b4f55fef (/usr/lib/llvm-8/bin/clang+0x787fef)
#28 0x00005556b4f5492b
clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(clang::CodeGen::CodeGenFunction&,
clang::OpenMPDirectiveKind, clang::CodeGen::RegionCodeGenTy const&, bool)
(/usr/lib/llvm-8/bin/clang+0x78692b)
#29 0x00005556b4f71e0e
clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(clang::CodeGen::CodeGenFunction&,
clang::CodeGen::RegionCodeGenTy const&, clang::SourceLocation,
llvm::ArrayRef<clang::Expr const*>, llvm::ArrayRef<clang::Expr const*>,
llvm::ArrayRef<clang::Expr const*>, llvm::ArrayRef<clang::Expr const*>)
(/usr/lib/llvm-8/bin/clang+0x7a3e0e)
#30 0x00005556b4d06c29
clang::CodeGen::CodeGenFunction::EmitOMPSingleDirective(clang::OMPSingleDirective
const&) (/usr/lib/llvm-8/bin/clang+0x538c29)
#31 0x00005556b4cefc64 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
(/usr/lib/llvm-8/bin/clang+0x521c64)
#32 0x00005556b4cefda3
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot)
(/usr/lib/llvm-8/bin/clang+0x521da3)
#33 0x00005556b4cf0018
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) (/usr/lib/llvm-8/bin/clang+0x522018)
#34 0x00005556b4cf31b3
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*)
(/usr/lib/llvm-8/bin/clang+0x5251b3)
#35 0x00005556b4cef780 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
(/usr/lib/llvm-8/bin/clang+0x521780)
#36 0x00005556b4d0e02d (/usr/lib/llvm-8/bin/clang+0x54002d)
#37 0x00005556b4f55fb5
clang::CodeGen::RegionCodeGenTy::operator()(clang::CodeGen::CodeGenFunction&)
const (/usr/lib/llvm-8/bin/clang+0x787fb5)
#38 0x00005556b4f55fef (/usr/lib/llvm-8/bin/clang+0x787fef)
#39 0x00005556b4d16b0e
clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(clang::CapturedStmt
const&) (/usr/lib/llvm-8/bin/clang+0x548b0e)
#40 0x00005556b4f69e61 (/usr/lib/llvm-8/bin/clang+0x79be61)
#41 0x00005556b4f69f36
clang::CodeGen::CGOpenMPRuntime::emitParallelOutlinedFunction(clang::OMPExecutableDirective
const&, clang::VarDecl const*, clang::OpenMPDirectiveKind,
clang::CodeGen::RegionCodeGenTy const&) (/usr/lib/llvm-8/bin/clang+0x79bf36)
#42 0x00005556b4d0a6bb (/usr/lib/llvm-8/bin/clang+0x53c6bb)
#43 0x00005556b4d0ab11
clang::CodeGen::CodeGenFunction::EmitOMPParallelDirective(clang::OMPParallelDirective
const&) (/usr/lib/llvm-8/bin/clang+0x53cb11)
#44 0x00005556b4cefca4 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
(/usr/lib/llvm-8/bin/clang+0x521ca4)
#45 0x00005556b4cefda3
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot)
(/usr/lib/llvm-8/bin/clang+0x521da3)
#46 0x00005556b4d24702
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::CodeGen::FunctionArgList&,
clang::Stmt const*) (/usr/lib/llvm-8/bin/clang+0x556702)
#47 0x00005556b4d2e0fb
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&)
(/usr/lib/llvm-8/bin/clang+0x5600fb)
#48 0x00005556b4d77ed4
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (/usr/lib/llvm-8/bin/clang+0x5a9ed4)
#49 0x00005556b4d747e8
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (/usr/lib/llvm-8/bin/clang+0x5a67e8)
#50 0x00005556b4d74f50
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl)
(/usr/lib/llvm-8/bin/clang+0x5a6f50)
#51 0x00005556b4d7a6dd (/usr/lib/llvm-8/bin/clang+0x5ac6dd)
#52 0x00005556b4d7b33b
clang::CodeGen::CodeGenModule::EmitDeclContext(clang::DeclContext const*)
(/usr/lib/llvm-8/bin/clang+0x5ad33b)
#53 0x00005556b4d7a559 (/usr/lib/llvm-8/bin/clang+0x5ac559)
#54 0x00005556b52835e1 (/usr/lib/llvm-8/bin/clang+0xab55e1)
#55 0x00005556b527ba0c (/usr/lib/llvm-8/bin/clang+0xaada0c)
#56 0x00005556b58e978c clang::ParseAST(clang::Sema&, bool, bool)
(/usr/lib/llvm-8/bin/clang+0x111b78c)
#57 0x00005556b527ff71 clang::CodeGenAction::ExecuteAction()
(/usr/lib/llvm-8/bin/clang+0xab1f71)
#58 0x00005556b50ce7b6 clang::FrontendAction::Execute()
(/usr/lib/llvm-8/bin/clang+0x9007b6)
#59 0x00005556b5098306
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/lib/llvm-8/bin/clang+0x8ca306)
#60 0x00005556b517784b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/lib/llvm-8/bin/clang+0x9a984b)
#61 0x00005556b4c596c8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/lib/llvm-8/bin/clang+0x48b6c8)
#62 0x00005556b4c48add main (/usr/lib/llvm-8/bin/clang+0x47aadd)
#63 0x00007eff6279ab17 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x22b17)
#64 0x00005556b4c575ba _start (/usr/lib/llvm-8/bin/clang+0x4895ba)
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 8.0.0-svn343946-1~exp1+0~20181007200936.2062~1.gbpea43b1 (trunk)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ 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: /tmp/VC5Decompressor-3e2f2e.cpp
clang: note: diagnostic msg: /tmp/VC5Decompressor-3e2f2e.sh
clang: note: diagnostic msg: 

********************

-- 
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/20181020/1edf6df3/attachment-0001.html>


More information about the llvm-bugs mailing list