[LLVMbugs] [Bug 23663] New: OpenMP crash

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 26 11:49:03 PDT 2015


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

            Bug ID: 23663
           Summary: OpenMP crash
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ismail at donmez.ws
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Reduced from http://www.kevinbeason.com/smallpt/smallpt.txt

λ clang -v
clang version 3.7.0 (trunk 238128)
Target: x86_64-suse-linux
Thread model: posix
Found candidate GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8
Selected GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64

λ cat t.cpp
struct t {
  double x;
};

int main(){
  int h;
  t r;
#pragma omp parallel for schedule(dynamic, 1) private(r)
  for (int y=0; y<h; y++){
  }
}

λ clang++ -fopenmp -O2 t.cpp                                                    
clang-3.7: ../tools/clang/lib/CodeGen/CGCleanup.cpp:629: void
clang::CodeGen::CodeGenFunction::PopCleanupBlock(bool): Assertio
n `!Scope.isNormalCleanup() || !HasPrebranchedFallthrough ||
(Scope.getNormalBlock() && FallthroughSource->getTerminator()->ge
tSuccessor(0) == Scope.getNormalBlock())' failed.
#0 0x7f4f62bae778 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/opt/clang/lib64/libLLVMSupport.so.3.7+0xc7778)
#1 0x7f4f62bafc0b (/opt/clang/lib64/libLLVMSupport.so.3.7+0xc8c0b)
#2 0x7f4f610c9440 __restore_rt (/lib64/libc.so.6+0x33440)
#3 0x7f4f610c93c7 __GI_raise
/usr/src/debug/glibc-2.21/signal/../sysdeps/unix/sysv/linux/raise.c:55:0
#4 0x7f4f610ca79a __GI_abort /usr/src/debug/glibc-2.21/stdlib/abort.c:80:0
#5 0x7f4f610c22e6 __assert_fail_base
/usr/src/debug/glibc-2.21/assert/assert.c:92:0
#6 0x7f4f610c2392 (/lib64/libc.so.6+0x2c392)
#7 0x7f4f5b9eb676 clang::CodeGen::CodeGenFunction::PopCleanupBlock(bool)
(/opt/clang/lib64/libclangCodeGen.so.3.7+0xd4676)
#8 0x7f4f5b9eb9d2
clang::CodeGen::CodeGenFunction::PopCleanupBlocks(clang::CodeGen::EHScopeStack::stable_iterator,
unsigned lo
ng) (/opt/clang/lib64/libclangCodeGen.so.3.7+0xd49d2)
#9 0x7f4f5baaee2d (/opt/clang/lib64/libclangCodeGen.so.3.7+0x197e2d)
#10 0x7f4f5baabfc2 (/opt/clang/lib64/libclangCodeGen.so.3.7+0x194fc2)
#11 0x7f4f5baca8ed (/opt/clang/lib64/libclangCodeGen.so.3.7+0x1b38ed)
#12 0x7f4f5bac9cc2
clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(clang::OMPLoopDirective
const&) (/opt/clang/lib64/libclangCodeGen.so.3.7+0x1b2cc2)
#13 0x7f4f5bad2295 (/opt/clang/lib64/libclangCodeGen.so.3.7+0x1bb295)
#14 0x7f4f5baad851 (/opt/clang/lib64/libclangCodeGen.so.3.7+0x196851)
#15 0x7f4f5bac32cf
clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(clang::CapturedStmt
const&) (/opt/clang/lib64
/libclangCodeGen.so.3.7+0x1ac2cf)
#16 0x7f4f5baa2be8
clang::CodeGen::CGOpenMPRuntime::emitParallelOutlinedFunction(clang::OMPExecutableDirective
const&, clang::
VarDecl const*, llvm::function_ref<void (clang::CodeGen::CodeGenFunction&)>
const&) (/opt/clang/lib64/libclangCodeGen.so.3.7+0
x18bbe8)
#17 0x7f4f5bac7931 (/opt/clang/lib64/libclangCodeGen.so.3.7+0x1b0931)
#18 0x7f4f5bacc243
clang::CodeGen::CodeGenFunction::EmitOMPParallelForDirective(clang::OMPParallelForDirective
const&) (/opt/c
lang/lib64/libclangCodeGen.so.3.7+0x1b5243)
#19 0x7f4f5bab8b54 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*) (/opt/clang/lib64/libclangCodeGen.so.3.7+0x1a
1b54)
#20 0x7f4f5bac02dc
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::Code
Gen::AggValueSlot) (/opt/clang/lib64/libclangCodeGen.so.3.7+0x1a92dc)
#21 0x7f4f5bae4a2a
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctio
nInfo const&) (/opt/clang/lib64/libclangCodeGen.so.3.7+0x1cda2a)
#22 0x7f4f5baf2733
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (/opt/cl
ang/lib64/libclangCodeGen.so.3.7+0x1db733)
#23 0x7f4f5baef5c3
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (/opt/clang/lib6
4/libclangCodeGen.so.3.7+0x1d85c3)
#24 0x7f4f5baf4169
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*)
(/opt/clang/lib64/libclangCodeGen.so.3.7+0x1d
d169)
#25 0x7f4f5bb57acf (/opt/clang/lib64/libclangCodeGen.so.3.7+0x240acf)
#26 0x7f4f5badf1e7 (/opt/clang/lib64/libclangCodeGen.so.3.7+0x1c81e7)
#27 0x7f4f5cce7343 clang::ParseAST(clang::Sema&, bool, bool)
(/opt/clang/lib64/libclangParse.so.3.7+0x2b343)
#28 0x7f4f61bd82ce clang::FrontendAction::Execute()
(/opt/clang/lib64/libclangFrontend.so.3.7+0xa22ce)
#29 0x7f4f61baa2cc
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/opt/clang/lib64/libclangFrontend.so.3.7+0x742cc)
#30 0x7f4f619341ec clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/opt/clang/lib64/libclangFrontendTool.so.3.7+0x31ec)
#31 0x40f5b1 cc1_main(llvm::ArrayRef<char const*>, char const*, void*)
(/opt/clang/bin/clang-3.7+0x40f5b1)
#32 0x40e386 main (/opt/clang/bin/clang-3.7+0x40e386)
#33 0x7f4f610b68c5 __libc_start_main
/usr/src/debug/glibc-2.21/csu/libc-start.c:323:0
#34 0x40b959 _start (/opt/clang/bin/clang-3.7+0x40b959)
Stack dump:
0.      Program arguments: /opt/clang/bin/clang-3.7 -cc1 -triple
x86_64-suse-linux -emit-obj -disable-free -main-file-name t.cpp
-mrelocation-model static -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 -resource-dir
/opt/clang/bin/../lib64/clang/3.7.0 -internal-isystem
/opt/clang/bin/../include/c++/v1 -internal-isystem /usr/local/include
-internal-isystem /opt/clang/bin/../lib64/clang/3.7.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-fdeprecated-macro -fdebug-compilation-dir /home/ismail -ferror-limit 19
-fmessage-length 126 -fopenmp -mstackrealign -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics
-vectorize-loops -vectorize-slp -o /tmp/t-c07ad4.o -x c++ t.cpp
1.      <eof> parser at end of file
2.      t.cpp:5:5: LLVM IR generation of declaration 'main'
3.      t.cpp:5:5: Generating code for declaration 'main'
clang-3.7: error: unable to execute command: Aborted
clang-3.7: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (trunk 238128)
Target: x86_64-suse-linux
Thread model: posix
clang-3.7: 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-3.7: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.7: note: diagnostic msg: /tmp/t-cfa054.cpp
clang-3.7: note: diagnostic msg: /tmp/t-cfa054.sh
clang-3.7: 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/20150526/c8375716/attachment.html>


More information about the llvm-bugs mailing list