[llvm-bugs] [Bug 37517] New: Assertion `NumReferences == 0 && "Node deleted while references remain"' with -inline -newgvn

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 18 05:13:42 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37517

            Bug ID: 37517
           Summary: Assertion `NumReferences == 0 && "Node deleted while
                    references remain"' with -inline -newgvn
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mikael.holmen at ericsson.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20318
  --> https://bugs.llvm.org/attachment.cgi?id=20318&action=edit
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> >
> >, std::less<llvm::Function const*>, std::allocator<std::pair<llvm::Function
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180518/02d35464/attachment.html>


More information about the llvm-bugs mailing list