<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] Seg fault when trying to compile LLVM IR : problem with phi node"
href="https://bugs.llvm.org/show_bug.cgi?id=35516">35516</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[CLANG] Seg fault when trying to compile LLVM IR : problem with phi node
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.8
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nicolas.bonfante@insa-lyon.fr
</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=19517" name="attach_19517" title="Source code that seg fault when compiled with clang">attachment 19517</a> <a href="attachment.cgi?id=19517&action=edit" title="Source code that seg fault when compiled with clang">[details]</a></span>
Source code that seg fault when compiled with clang
Hi all,
When I try to compile (with command line : "clang simple.ll -o exec") the llvm
ir file in attachment, I get a seg fault. My machine is linux (ubuntu 16.04)
machine with an intel i7 and 16gb of ram.
I got the following error report :
warning: overriding the module target triple with x86_64-pc-linux-gnu
[-Woverride-module]
0 libLLVM-3.8.so.1 0x00007fa1d9183d38
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 56
1 libLLVM-3.8.so.1 0x00007fa1d9181fc6 llvm::sys::RunSignalHandlers() + 54
2 libLLVM-3.8.so.1 0x00007fa1d9182129
3 libc.so.6 0x00007fa1d82be4b0
4 libLLVM-3.8.so.1 0x00007fa1d92a6c39
llvm::PHINode::removeIncomingValue(unsigned int, bool) + 73
5 libLLVM-3.8.so.1 0x00007fa1d91a4847
llvm::BasicBlock::removePredecessor(llvm::BasicBlock*, bool) + 487
6 libLLVM-3.8.so.1 0x00007fa1d951e152
7 libLLVM-3.8.so.1 0x00007fa1d92c92a2
llvm::FPPassManager::runOnFunction(llvm::Function&) + 498
8 libLLVM-3.8.so.1 0x00007fa1d92c963b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
9 libLLVM-3.8.so.1 0x00007fa1d92c8eef
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 783
10 clang 0x00000000006eb0d3
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_pwrite_stream*)
+ 4403
11 clang 0x0000000000a16e71
12 clang 0x000000000099aa0e clang::FrontendAction::Execute() + 302
13 clang 0x0000000000970406
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 278
14 clang 0x0000000000a152b3
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1987
15 clang 0x00000000006b3528 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 2264
16 clang 0x00000000006affbc main + 6252
17 libc.so.6 0x00007fa1d82a9830 __libc_start_main + 240
18 clang 0x00000000006b1969 _start + 41
Stack dump:
0. Program arguments: /usr/lib/llvm-3.8/bin/clang -cc1 -triple
x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier
-main-file-name simple.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
-debugger-tuning=gdb -resource-dir /usr/lib/llvm-3.8/bin/../lib/clang/3.8.0
-fdebug-compilation-dir /home/nico/testCompiler -ferror-limit 19
-fmessage-length 134 -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/simple-b4ad3b.o -x ir simple.ll
1. Code generation
2. Running pass 'Function Pass Manager' on module 'simple.ll'.
3. Running pass 'Remove unreachable blocks from the CFG' on function
'@simple'
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.
Anybody have an idea what is the problem ?
Cheers,
Nicolas</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>