[llvm-bugs] [Bug 25274] New: Compiler crash (segmentation fault) when compiling hand-written LLVM IR code

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 21 08:48:43 PDT 2015


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

            Bug ID: 25274
           Summary: Compiler crash (segmentation fault) when compiling
                    hand-written LLVM IR code
           Product: clang
           Version: 3.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sznurek at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 15133
  --> https://llvm.org/bugs/attachment.cgi?id=15133&action=edit
compiler crashes when compiling this code

When compiling attached file (clang -c sort-opt.ll) I had got following error:

0  libLLVM.so.3.7  0x00007f9b06043228
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 56
1  libLLVM.so.3.7  0x00007f9b06042041
2  libpthread.so.0 0x00007f9b058d4d60
3  libLLVM.so.3.7  0x00007f9b0642c8e8
llvm::FastISel::handlePHINodesInSuccessorBlocks(llvm::BasicBlock const*) + 664
4  libLLVM.so.3.7  0x00007f9b0642ccc7
llvm::FastISel::selectInstruction(llvm::Instruction const*) + 55
5  libLLVM.so.3.7  0x00007f9b0653e13c
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 444
6  libLLVM.so.3.7  0x00007f9b0653fa21
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 961
7  libLLVM.so.3.7  0x00007f9b072861c4
8  libLLVM.so.3.7  0x00007f9b0616685f
llvm::FPPassManager::runOnFunction(llvm::Function&) + 639
9  libLLVM.so.3.7  0x00007f9b06166bfb
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
10 libLLVM.so.3.7  0x00007f9b061663e6
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 758
11 clang-3.7       0x0000000000688174
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_pwrite_stream*)
+ 2852
12 clang-3.7       0x000000000098418d
13 clang-3.7       0x0000000000908b06 clang::FrontendAction::Execute() + 502
14 clang-3.7       0x00000000008e2e79
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 313
15 clang-3.7       0x0000000000982624
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1940
16 clang-3.7       0x0000000000652958 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 2280
17 clang-3.7       0x000000000064db7b main + 1003
18 libc.so.6       0x00007f9b04fa8610 __libc_start_main + 240
19 clang-3.7       0x0000000000650839 _start + 41
Stack dump:
0.    Program arguments: /usr/bin/clang-3.7 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -main-file-name sort-opt.ll -mrelocation-model static
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-dwarf-column-info -coverage-file /home/sznurek/Programming/CC/sort-opt.ll
-resource-dir /usr/bin/../lib/clang/3.7.0 -fdebug-compilation-dir
/home/sznurek/Programming/CC -ferror-limit 19 -fmessage-length 168
-mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics
-o sort-opt.o -x ir sort-opt.ll 
1.    Code generation
2.    Running pass 'Function Pass Manager' on module 'sort-opt.ll'.
3.    Running pass 'X86 DAG->DAG Instruction Selection' on function
'@_Z4sortPjS_'
clang-3.7: error: unable to execute command: Segmentation fault (core dumped)
clang-3.7: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (tags/RELEASE_370/final)
Target: x86_64-unknown-linux-gnu
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: Error generating preprocessed source(s) - no
preprocessable inputs.

-- 
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/20151021/c13691d3/attachment-0001.html>


More information about the llvm-bugs mailing list