<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 - llvm-reduce crashes in extractArgumentsFromModule"
href="https://bugs.llvm.org/show_bug.cgi?id=45473">45473</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>llvm-reduce crashes in extractArgumentsFromModule
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</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>llvm-reduce
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jay.foad@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dblaikie@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23325" name="attach_23325" title="test case">attachment 23325</a> <a href="attachment.cgi?id=23325&action=edit" title="test case">[details]</a></span>
test case
With the attached test case and llc built from current master (commit
625acd8f6847a156b236b8f11b4b02b11cac3766) I get:
$ llvm-reduce -test test.sh p.ll
[...]
**** SUCCESS | lines: 0
Increasing granularity...Success! New Chunks:
[1,5]
[6,9]
Program received signal SIGSEGV, Segmentation fault.
llvm::PointerIntPair<llvm::ilist_node_base<true>*, 1u, unsigned int,
llvm::PointerLikeTypeTraits<llvm::ilist_node_base<true>*>,
llvm::PointerIntPairInfo<llvm::ilist_node_base<true>*, 1u,
llvm::PointerLikeTypeTraits<llvm::ilist_node_base<true>*> >
<span class="quote">>::setPointer(llvm::ilist_node_base<true>*) & (this=0x0, PtrVal=0x0) at</span >
/home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:64
64 Value = Info::updatePointer(Value, PtrVal);
(gdb) bt
#0 llvm::PointerIntPair<llvm::ilist_node_base<true>*, 1u, unsigned int,
llvm::PointerLikeTypeTraits<llvm::ilist_node_base<true>*>,
llvm::PointerIntPairInfo<llvm::ilist_node_base<true>*, 1u,
llvm::PointerLikeTypeTraits<llvm::ilist_node_base<true>*> >
<span class="quote">>::setPointer(llvm::ilist_node_base<true>*) & (this=0x0, PtrVal=0x0) at</span >
/home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:64
#1 0x000000000093bc1d in llvm::ilist_node_base<true>::setPrev (this=0x0,
Prev=0x0) at
/home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/ilist_node_base.h:40
#2 0x00000000009b6a73 in llvm::ilist_base<true>::removeImpl (N=...) at
/home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/ilist_base.h:33
#3 0x00000000009b6a15 in
llvm::ilist_base<true>::remove<llvm::ilist_node_impl<llvm::ilist_detail::node_options<llvm::Instruction,
true, false, void> > > (N=...) at
/home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/ilist_base.h:80
#4 0x00000000009b69f1 in llvm::simple_ilist<llvm::Instruction>::remove
(this=0x28, N=...) at
/home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/simple_ilist.h:183
#5 0x00000000009b6996 in
llvm::iplist_impl<llvm::simple_ilist<llvm::Instruction>,
llvm::SymbolTableListTraits<llvm::Instruction> >::remove (this=0x28, IT=...) at
/home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/ilist.h:254
#6 0x00000000009b6900 in
llvm::iplist_impl<llvm::simple_ilist<llvm::Instruction>,
llvm::SymbolTableListTraits<llvm::Instruction> >::erase (this=0x28, where=...)
at /home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/ilist.h:268
#7 0x0000000000a81a23 in llvm::Instruction::eraseFromParent (this=0x13cfbe0)
at /home/jayfoad2/git/llvm-project/llvm/lib/IR/Instruction.cpp:68
#8 0x0000000000935e79 in extractArgumentsFromModule (ChunksToKeep=std::vector
of length 1, capacity 1 = {...}, Program=0x139c410) at
/home/jayfoad2/git/llvm-project/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp:76
#9 0x000000000093122f in std::_Function_handler<void (std::vector<llvm::Chunk,
std::allocator<llvm::Chunk> > const&, llvm::Module*), void
(*)(std::vector<llvm::Chunk, std::allocator<llvm::Chunk> >,
llvm::Module*)>::_M_invoke(std::_Any_data const&, std::vector<llvm::Chunk,
std::allocator<llvm::Chunk> > const&, llvm::Module*&&) (__functor=...,
__args=@0x7fffffffd788: 0x139c410, __args=@0x7fffffffd788: 0x139c410) at
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h:297
#10 0x0000000000923540 in std::function<void (std::vector<llvm::Chunk,
std::allocator<llvm::Chunk> > const&,
llvm::Module*)>::operator()(std::vector<llvm::Chunk,
std::allocator<llvm::Chunk> > const&, llvm::Module*) const
(this=0x7fffffffdac0, __args=0x139c410, __args=0x139c410)
at
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h:687
#11 0x00000000009222a8 in llvm::runDeltaPass(llvm::TestRunner&, int,
std::function<void (std::vector<llvm::Chunk, std::allocator<llvm::Chunk> >
const&, llvm::Module*)>) (Test=..., Targets=18, ExtractChunksFromModule=...)
at
/home/jayfoad2/git/llvm-project/llvm/tools/llvm-reduce/deltas/Delta.cpp:132
#12 0x0000000000935716 in llvm::reduceArgumentsDeltaPass (Test=...) at
/home/jayfoad2/git/llvm-project/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp:124
#13 0x00000000009163e9 in llvm::runDeltaPasses (Tester=...) at
/home/jayfoad2/git/llvm-project/llvm/tools/llvm-reduce/DeltaManager.h:31
#14 0x0000000000915286 in main (argc=4, argv=0x7fffffffde28) at
/home/jayfoad2/git/llvm-project/llvm/tools/llvm-reduce/llvm-reduce.cpp:88
(gdb) up 8
#8 0x0000000000935e79 in extractArgumentsFromModule (ChunksToKeep=std::vector
of length 1, capacity 1 = {...}, Program=0x139c410) at
/home/jayfoad2/git/llvm-project/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp:76
76 I->eraseFromParent();
(gdb) call I->dump()
<badref> = shufflevector
Program received signal SIGSEGV, Segmentation fault.</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>