<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 - Assertion `NumReferences == 0 && "Node deleted while references remain"' with -inline -newgvn"
href="https://bugs.llvm.org/show_bug.cgi?id=37517">37517</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion `NumReferences == 0 && "Node deleted while references remain"' with -inline -newgvn
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mikael.holmen@ericsson.com
</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=20318" name="attach_20318" title="reproducer">attachment 20318</a> <a href="attachment.cgi?id=20318&action=edit" title="reproducer">[details]</a></span>
reproducer
opt -inline -newgvn -S -o - tr16019.ll
gives
opt: ../include/llvm/Analysis/CallGraph.h:181:
llvm::CallGraphNode::~CallGraphNode(): Assertion `NumReferences == 0 && "Node
deleted while references remain"' failed.
Stack dump:
0. Program arguments: ../llvm-patch/build-all/bin/opt -inline -newgvn -S
-o - tr16019.ll
1. Running pass 'CallGraph Pass Manager' on module 'tr16019.ll'.
#0 0x0000000001f911b4 PrintStackTraceSignalHandler(void*)
(../llvm-patch/build-all/bin/opt+0x1f911b4)
#1 0x0000000001f8f490 llvm::sys::RunSignalHandlers()
(../llvm-patch/build-all/bin/opt+0x1f8f490)
#2 0x0000000001f91518 SignalHandler(int)
(../llvm-patch/build-all/bin/opt+0x1f91518)
#3 0x00007f8254f23330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007f8253b12c37 gsignal
/build/eglibc-ripdx6/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007f8253b16028 abort
/build/eglibc-ripdx6/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007f8253b0bbf6 __assert_fail_base
/build/eglibc-ripdx6/eglibc-2.19/assert/assert.c:92:0
#7 0x00007f8253b0bca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x000000000144bc45 (../llvm-patch/build-all/bin/opt+0x144bc45)
#9 0x000000000144c086 std::_Rb_tree<llvm::Function const*,
std::pair<llvm::Function const* const, std::unique_ptr<llvm::CallGraphNode,
std::default_delete<llvm::CallGraphNode> > >,
std::_Select1st<std::pair<llvm::Function const* const,
std::unique_ptr<llvm::CallGraphNode, std::default_delete<llvm::CallGraphNode> >
<span class="quote">> >, std::less<llvm::Function const*>, std::allocator<std::pair<llvm::Function</span >
const* const, std::unique_ptr<llvm::CallGraphNode,
std::default_delete<llvm::CallGraphNode> > > > >::erase(llvm::Function const*
const&) (../llvm-patch/build-all/bin/opt+0x144c086)
#10 0x000000000144a905
llvm::CallGraph::removeFunctionFromModule(llvm::CallGraphNode*)
(../llvm-patch/build-all/bin/opt+0x144a905)
#11 0x0000000001b06c4b
llvm::LegacyInlinerBase::removeDeadFunctions(llvm::CallGraph&, bool)
(../llvm-patch/build-all/bin/opt+0x1b06c4b)
#12 0x000000000144e576 (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&)
(../llvm-patch/build-all/bin/opt+0x144e576)
#13 0x0000000001a32c45 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(../llvm-patch/build-all/bin/opt+0x1a32c45)
#14 0x000000000073e51c main (../llvm-patch/build-all/bin/opt+0x73e51c)
#15 0x00007f8253afdf45 __libc_start_main
/build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:321:0
#16 0x0000000000727b4d _start (../llvm-patch/build-all/bin/opt+0x727b4d)
Abort
This seems to be old, trying out some old binaries starts crashing around June
22 2017.
We don't usually run -newgvn, we found this when doing fuzz testing with random
passes.</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>