<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang-7: error: unable to execute command: Segmentation fault"
   href="https://bugs.llvm.org/show_bug.cgi?id=38073">38073</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-7: error: unable to execute command: Segmentation fault
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>siegmar.gross@informatik.hs-fulda.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20524" name="attach_20524" title="diagnostic msg: /tmp/mat_mult_block_ikj-0eabee.c">attachment 20524</a> <a href="attachment.cgi?id=20524&action=edit" title="diagnostic msg: /tmp/mat_mult_block_ikj-0eabee.c">[details]</a></span>
diagnostic msg: /tmp/mat_mult_block_ikj-0eabee.c

Hi,

yesterday I've built the latest version of llvm-trunk using Cmake on my "SUSE
Linux Enterprise Server 12.3 (x86_64)". I get the following error compiling
a small program. I'm able to build a working program with clang-6.0.0
as you can see below.


loki introduction 120 clang -v
clang version 6.0.0 (tags/RELEASE_600/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/llvm-6.0.0/bin
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
Found CUDA installation: /usr/local/cuda, version 9.0

loki introduction 121 \clang -m64 -std=c11 -O2 -mllvm -polly -mllvm
-polly-parallel -mllvm -polly-vectorizer=stripmine mat_mult_block_ikj.c -lomp
-lm

loki introduction 122 a.out
c[1984][1984] = a[1984][1984] * b[1984][1984] was successful.
                      elapsed time      cpu time
Mult "a" and "b":          4.00 s        0.00 s
loki introduction 123



loki introduction 123 clang -v
clang version 7.0.0 (trunk 336240)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/llvm-trunk/bin
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
Found CUDA installation: /usr/local/cuda-9.0, version 9.0


oki introduction 124 \clang -m64 -std=c11 -O2 -mllvm -polly -mllvm
-polly-parallel -mllvm -polly-vectorizer=stripmine mat_mult_block_ikj.c -lomp
-lm
Stack dump:
0.    Program arguments: /usr/local/llvm-trunk/bin/clang-7 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name mat_mult_block_ikj.c -mrelocation-model
static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info
-debugger-tuning=gdb -momit-leaf-frame-pointer -resource-dir
/usr/local/llvm-trunk/lib64/clang/7.0.0 -c-isystem
/usr/local/valgrind-3.12.0/include -c-isystem /usr/local/include -c-isystem
/usr/include -c-isystem /usr/local/cuda-9.0/include -c-isystem
/usr/local/hwloc-2.0.1/include -c-isystem /home/fd1026/Linux/x86_64/include
-internal-isystem /usr/local/include -internal-isystem
/usr/local/llvm-trunk/lib64/clang/7.0.0/include -internal-externc-isystem
/include -internal-externc-isystem /usr/include -O2 -std=c11
-fdebug-compilation-dir
/home/fd1026/work/skripte/master/parallel/prog/introduction -ferror-limit 19
-fmessage-length 125 -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -vectorize-slp -mllvm -polly -mllvm
-polly-parallel -mllvm -polly-vectorizer=stripmine -o
/tmp/mat_mult_block_ikj-0120ca.o -x c mat_mult_block_ikj.c
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module 'mat_mult_block_ikj.c'.
4.    Running pass 'Live Variable Analysis' on function
'@main_polly_subfn_polly_subfn'
#0 0x00007f7fe4b72e2a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/llvm-trunk/lib64/libLLVMSupport.so.7+0x106e2a)
#1 0x00007f7fe4b71475 llvm::sys::RunSignalHandlers()
(/usr/local/llvm-trunk/lib64/libLLVMSupport.so.7+0x105475)
#2 0x00007f7fe4b7158c SignalHandler(int)
(/usr/local/llvm-trunk/lib64/libLLVMSupport.so.7+0x10558c)
#3 0x00007f7fe7f5ac10 __restore_rt (/lib64/libpthread.so.0+0x10c10)
#4 0x00007f7fe8c1e3ae llvm::LiveVariables::HandleVirtRegUse(unsigned int,
llvm::MachineBasicBlock*, llvm::MachineInstr&)
(/usr/local/llvm-trunk/lib64/libLLVMCodeGen.so.7+0x1a23ae)
#5 0x00007f7fe8c1e9a0 llvm::LiveVariables::runOnInstr(llvm::MachineInstr&,
llvm::SmallVectorImpl<unsigned int>&)
(/usr/local/llvm-trunk/lib64/libLLVMCodeGen.so.7+0x1a29a0)
#6 0x00007f7fe8c1f2e3 llvm::LiveVariables::runOnBlock(llvm::MachineBasicBlock*,
unsigned int) (/usr/local/llvm-trunk/lib64/libLLVMCodeGen.so.7+0x1a32e3)
#7 0x00007f7fe8c21c1f
llvm::LiveVariables::runOnMachineFunction(llvm::MachineFunction&)
(/usr/local/llvm-trunk/lib64/libLLVMCodeGen.so.7+0x1a5c1f)
#8 0x00007f7fe8c7faa1 llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/usr/local/llvm-trunk/lib64/libLLVMCodeGen.so.7+0x203aa1)
#9 0x00007f7fe5ee967a llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/local/llvm-trunk/lib64/libLLVMCore.so.7+0x17f67a)
#10 0x00007f7fe5ee9723 llvm::FPPassManager::runOnModule(llvm::Module&)
(/usr/local/llvm-trunk/lib64/libLLVMCore.so.7+0x17f723)
#11 0x00007f7fe5ee9f8c llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/llvm-trunk/lib64/libLLVMCore.so.7+0x17ff8c)
#12 0x00007f7fe74c37dc (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/usr/local/llvm-trunk/lib64/libclangCodeGen.so.7+0xbc7dc)
#13 0x00007f7fe74c5b58 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, 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/llvm-trunk/lib64/libclangCodeGen.so.7+0xbeb58)
#14 0x00007f7fe76da45c
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/llvm-trunk/lib64/libclangCodeGen.so.7+0x2d345c)
#15 0x00007f7fdfccb200 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/llvm-trunk/lib64/libclangParse.so.7+0x2f200)
#16 0x00007f7fe76d9831 clang::CodeGenAction::ExecuteAction()
(/usr/local/llvm-trunk/lib64/libclangCodeGen.so.7+0x2d2831)
#17 0x00007f7fe6dcc0f6 clang::FrontendAction::Execute()
(/usr/local/llvm-trunk/lib64/libclangFrontend.so.7+0xc40f6)
#18 0x00007f7fe6d8bd66
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/llvm-trunk/lib64/libclangFrontend.so.7+0x83d66)
#19 0x00007f7fe6b054e9
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/llvm-trunk/lib64/libclangFrontendTool.so.7+0x44e9)
#20 0x0000000000411f88 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/llvm-trunk/bin/clang-7+0x411f88)
#21 0x000000000040dac8 main (/usr/local/llvm-trunk/bin/clang-7+0x40dac8)
#22 0x00007f7fe2318725 __libc_start_main (/lib64/libc.so.6+0x20725)
#23 0x000000000040f6e9 _start
/home/abuild/rpmbuild/BUILD/glibc-2.22/csu/../sysdeps/x86_64/start.S:121:0
clang-7: error: unable to execute command: Segmentation fault (core dumped)
clang-7: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 7.0.0 (trunk 336240)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/llvm-trunk/bin
clang-7: note: diagnostic msg: PLEASE submit a bug report to
<a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source,
and associated run script.
clang-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-7: note: diagnostic msg: /tmp/mat_mult_block_ikj-0eabee.c
clang-7: note: diagnostic msg: /tmp/mat_mult_block_ikj-0eabee.sh
clang-7: note: diagnostic msg:

********************
loki introduction 125



Hopefully somebody can fix the problem. Do you need anything
else to locate the error? Thank you very much for any help
in advance.


Kind regards

Siegmar

------------------------------------------

diagnostic msg: /tmp/mat_mult_block_ikj-0eabee.sh

# Crash reproducer for clang version 7.0.0 (trunk 336240)
# Driver args: "-m64" "-std=c11" "-O2" "-mllvm" "-polly" "-mllvm"
"-polly-parallel" "-mllvm" "-polly-vectorizer=stripmine" "mat_mult_block_ikj.c"
"-lomp" "-lm"
# Original command:  "/usr/local/llvm-trunk/bin/clang-7" "-cc1" "-triple"
"x86_64-unknown-linux-gnu" "-emit-obj" "-disable-free" "-disable-llvm-verifier"
"-discard-value-names" "-main-file-name" "mat_mult_block_ikj.c"
"-mrelocation-model" "static" "-mthread-model" "posix" "-fmath-errno"
"-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-fuse-init-array"
"-target-cpu" "x86-64" "-dwarf-column-info" "-debugger-tuning=gdb"
"-momit-leaf-frame-pointer" "-resource-dir"
"/usr/local/llvm-trunk/lib64/clang/7.0.0" "-c-isystem"
"/usr/local/valgrind-3.12.0/include" "-c-isystem" "/usr/local/include"
"-c-isystem" "/usr/include" "-c-isystem" "/usr/local/cuda-9.0/include"
"-c-isystem" "/usr/local/hwloc-2.0.1/include" "-c-isystem"
"/home/fd1026/Linux/x86_64/include" "-internal-isystem" "/usr/local/include"
"-internal-isystem" "/usr/local/llvm-trunk/lib64/clang/7.0.0/include"
"-internal-externc-isystem" "/include" "-internal-externc-isystem"
"/usr/include" "-O2" "-std=c11" "-fdebug-compilation-dir"
"/home/fd1026/work/skripte/master/parallel/prog/introduction" "-ferror-limit"
"19" "-fmessage-length" "125" "-fobjc-runtime=gcc" "-fdiagnostics-show-option"
"-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-mllvm" "-polly"
"-mllvm" "-polly-parallel" "-mllvm" "-polly-vectorizer=stripmine" "-o"
"/tmp/mat_mult_block_ikj-0120ca.o" "-x" "c" "mat_mult_block_ikj.c"
 "/usr/local/llvm-trunk/bin/clang-7" "-cc1" "-triple"
"x86_64-unknown-linux-gnu" "-emit-obj" "-disable-free" "-disable-llvm-verifier"
"-discard-value-names" "-main-file-name" "mat_mult_block_ikj.c"
"-mrelocation-model" "static" "-mthread-model" "posix" "-fmath-errno"
"-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-fuse-init-array"
"-target-cpu" "x86-64" "-dwarf-column-info" "-debugger-tuning=gdb"
"-momit-leaf-frame-pointer" "-c-isystem" "/usr/local/valgrind-3.12.0/include"
"-c-isystem" "/usr/local/include" "-c-isystem" "/usr/include" "-c-isystem"
"/usr/local/cuda-9.0/include" "-c-isystem" "/usr/local/hwloc-2.0.1/include"
"-c-isystem" "/home/fd1026/Linux/x86_64/include" "-O2" "-std=c11"
"-ferror-limit" "19" "-fmessage-length" "125" "-fobjc-runtime=gcc"
"-fdiagnostics-show-option" "-fcolor-diagnostics" "-vectorize-loops"
"-vectorize-slp" "-mllvm" "-polly" "-mllvm" "-polly-parallel" "-mllvm"
"-polly-vectorizer=stripmine" "-x" "c" "mat_mult_block_ikj-0eabee.c"</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>