<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 - Compiler crash caused by SVN r343148, "[DebugInfo] Generate debug information for labels.""
href="https://bugs.llvm.org/show_bug.cgi?id=39094">39094</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Compiler crash caused by SVN r343148, "[DebugInfo] Generate debug information for labels."
</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>All
</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>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>martin@martin.st
</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=20930" name="attach_20930" title="Reproduction sample">attachment 20930</a> <a href="attachment.cgi?id=20930&action=edit" title="Reproduction sample">[details]</a></span>
Reproduction sample
After commit SVN r343148, "[DebugInfo] Generate debug information for labels.",
compilation for certain source files crash.
To reproduce, compile the attached preprocessed code sample like this:
$ bin/clang -target i686-w64-mingw32 -c test.c -O2 -g
clang-8: ../include/llvm/CodeGen/SlotIndexes.h:418: llvm::SlotIndex
llvm::SlotIndexes::getInstructionIndex(const llvm::MachineInstr&) const:
Assertion `!BundleStart.isDebugInstr() && "Could not use a debug instruction to
query mi2iMap."' failed.
Stack dump:
0. Program arguments: /home/martin/code/llvm-bisect/build/bin/clang-8 -cc1
-triple i686-w64-windows-gnu -emit-obj -disable-free -main-file-name test.c
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -target-cpu pentium4 -dwarf-column-info
-debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb
-momit-leaf-frame-pointer -coverage-notes-file
/home/martin/code/llvm-bisect/build/test.gcno -resource-dir
/home/martin/code/llvm-bisect/build/lib/clang/8.0.0 -internal-isystem
/home/martin/code/llvm-bisect/build/lib/clang/8.0.0/include -internal-isystem
/usr/lib/i686-w64-mingw32/sys-root/mingw/include -internal-isystem
/usr/lib/i686-w64-mingw32/include -internal-isystem /usr/lib/include -O2
-fdebug-compilation-dir /home/martin/code/llvm-bisect/build -ferror-limit 19
-fmessage-length 80 -fno-use-cxa-atexit -fobjc-runtime=gcc -fdwarf-exceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o test.o -x c test.c -faddrsig
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'test.c'.
4. Running pass 'Greedy Register Allocator' on function '@__dtoa'
#0 0x0000000001a924ba llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1a924ba)
#1 0x0000000001a9084c llvm::sys::RunSignalHandlers()
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1a9084c)
#2 0x0000000001a909b7 SignalHandler(int)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1a909b7)
#3 0x00007f0584f6e390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x00007f0583ce0428 gsignal
/build/glibc-Cl5G7W/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007f0583ce202a abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:91:0
#6 0x00007f0583cd8bd7 __assert_fail_base
/build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:92:0
#7 0x00007f0583cd8c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x0000000001440547 (anonymous namespace)::RAGreedy::growRegion((anonymous
namespace)::RAGreedy::GlobalSplitCandidate&) (.constprop.458)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1440547)
#9 0x000000000144c084 (anonymous
namespace)::RAGreedy::calculateRegionSplitCost(llvm::LiveInterval&,
llvm::AllocationOrder&, llvm::BlockFrequency&, unsigned int&, bool, bool*)
(.constprop.445) (/home/martin/code/llvm-bisect/build/bin/clang-8+0x144c084)
#10 0x0000000001451101 (anonymous
namespace)::RAGreedy::selectOrSplitImpl(llvm::LiveInterval&,
llvm::SmallVectorImpl<unsigned int>&, llvm::SmallSet<unsigned int, 16u,
std::less<unsigned int> >&, unsigned int) (.constprop.432)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1451101)
#11 0x000000000145189a (anonymous
namespace)::RAGreedy::selectOrSplit(llvm::LiveInterval&,
llvm::SmallVectorImpl<unsigned int>&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x145189a)
#12 0x00000000014cbcd2 llvm::RegAllocBase::allocatePhysRegs()
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x14cbcd2)
#13 0x000000000144a16b (anonymous
namespace)::RAGreedy::runOnMachineFunction(llvm::MachineFunction&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x144a16b)
#14 0x000000000120efb1
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(.part.34.constprop.35)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x120efb1)
#15 0x00000000015b82cc llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x15b82cc)
#16 0x00000000015b84ac llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x15b84ac)
#17 0x00000000015b95c9 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x15b95c9)
#18 0x0000000001c7560d (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1c7560d)
#19 0x0000000001c76f07 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> >)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1c76f07)
#20 0x000000000244d377
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x244d377)
#21 0x0000000002ce3d49 clang::ParseAST(clang::Sema&, bool, bool)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x2ce3d49)
#22 0x000000000244c6ef clang::CodeGenAction::ExecuteAction()
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x244c6ef)
#23 0x00000000020d23ae clang::FrontendAction::Execute()
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x20d23ae)
#24 0x000000000209bc8e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x209bc8e)
#25 0x0000000002174b41
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x2174b41)
#26 0x00000000009653e8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/martin/code/llvm-bisect/build/bin/clang-8+0x9653e8)
#27 0x00000000008fb316 main
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x8fb316)
#28 0x00007f0583ccb830 __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0
#29 0x0000000000961229 _start
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x961229)
clang-8: error: unable to execute command: Aborted (core dumped)
clang-8: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 8.0.0 (<a href="http://llvm.org/git/clang">http://llvm.org/git/clang</a>
11ebe64f8b742a1ba4bc121b1b8994cbb315d851) (llvm/trunk 343149)</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>