[llvm-bugs] [Bug 46687] New: CallGraphNode assertion failed "Node deleted while references remain"

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jul 11 13:48:33 PDT 2020


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

            Bug ID: 46687
           Summary: CallGraphNode assertion failed "Node deleted while
                    references remain"
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: xw111luoye at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Caused by commit cb8faaacb52c1c0f0b97379ac0e07a612c04c5ff
https://reviews.llvm.org/D82572

reproducer:
git clone https://github.com/ye-luo/miniqmc
cd miniqmc/build
cmake -DCMAKE_CXX_COMPILER=clang++ ..
make -j16 qmcwfs

clang++:
/gpfs/jlse-fs0/users/yeluo/opt/llvm-clang/llvm-project/llvm/include/llvm/Analysis/CallGraph.h:198:
llvm::CallGraphNode::~CallGraphNode(): Assertion `NumReferences == 0 && "Node
deleted while references remain"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /soft/compilers/llvm/master-20200711/bin/clang++
-DADD_ -DH5_USE_16_API -DHAVE_CONFIG_H -Drestrict=__restrict__
-I/soft/compilers/intel-2019/compilers_and_libraries/linux/mkl/include
-I/home/yeluo/opt/miniqmc/src
-I/home/yeluo/opt/miniqmc/build_BDW_V100_clang/src
-I/home/yeluo/opt/miniqmc/external_codes/catch -fopenmp -fomit-frame-pointer
-fstrict-aliasing -D__forceinline=inline -march=native -O3 -DNDEBUG -ffast-math
-std=c++11 -o CMakeFiles/qmcwfs.dir/DiracDeterminant.cpp.o -c
/home/yeluo/opt/miniqmc/src/QMCWaveFunctions/DiracDeterminant.cpp 
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'CallGraph Pass Manager' on module
'/home/yeluo/opt/miniqmc/src/QMCWaveFunctions/DiracDeterminant.cpp'.
 #0 0x00000000027bf034 PrintStackTraceSignalHandler(void*)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x27bf034)
 #1 0x00000000027bcc1e llvm::sys::RunSignalHandlers()
(/soft/compilers/llvm/master-20200711/bin/clang+++0x27bcc1e)
 #2 0x00000000027be1dd llvm::sys::CleanupOnSignal(unsigned long)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x27be1dd)
 #3 0x0000000002748db3 (anonymous
namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x2748db3)
 #4 0x0000000002748eec CrashRecoverySignalHandler(int)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x2748eec)
 #5 0x00007f689047d5d0 __restore_rt (/lib64/libpthread.so.0+0xf5d0)
 #6 0x00007f688efee207 raise (/lib64/libc.so.6+0x36207)
 #7 0x00007f688efef8f8 abort (/lib64/libc.so.6+0x378f8)
 #8 0x00007f688efe7026 __assert_fail_base (/lib64/libc.so.6+0x2f026)
 #9 0x00007f688efe70d2 (/lib64/libc.so.6+0x2f0d2)
#10 0x00000000019f6db0 llvm::CallGraph::invalidate(llvm::Module&,
llvm::PreservedAnalyses const&,
llvm::AnalysisManager<llvm::Module>::Invalidator&)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x19f6db0)
#11 0x00000000019fa232 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&) (/soft/compilers/llvm/master-20200711/bin/clang+++0x19fa232)
#12 0x00000000019f7c65
llvm::CallGraph::removeFunctionFromModule(llvm::CallGraphNode*)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x19f7c65)
#13 0x0000000002211526
llvm::LegacyInlinerBase::removeDeadFunctions(llvm::CallGraph&, bool)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x2211526)
#14 0x00000000019fbe25 (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x19fbe25)
#15 0x00000000020e9d14 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x20e9d14)
#16 0x00000000029d898f 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> >)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x29d898f)
#17 0x00000000035c2636
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x35c2636)
#18 0x0000000003ee3333 clang::ParseAST(clang::Sema&, bool, bool)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x3ee3333)
#19 0x0000000002f914e3 clang::FrontendAction::Execute()
(/soft/compilers/llvm/master-20200711/bin/clang+++0x2f914e3)
#20 0x0000000002f28dd3
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x2f28dd3)
#21 0x000000000303d3d2
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x303d3d2)
#22 0x00000000009fd5a3 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/soft/compilers/llvm/master-20200711/bin/clang+++0x9fd5a3)
#23 0x00000000009fb60c ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x9fb60c)
#24 0x0000000002df19c2 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const::$_1>(long)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x2df19c2)
#25 0x0000000002748cc7
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x2748cc7)
#26 0x0000000002df0fbd
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const
(/soft/compilers/llvm/master-20200711/bin/clang+++0x2df0fbd)
#27 0x0000000002dc087b
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/soft/compilers/llvm/master-20200711/bin/clang+++0x2dc087b)
#28 0x0000000002dc0c67
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/soft/compilers/llvm/master-20200711/bin/clang+++0x2dc0c67)
#29 0x0000000002dd8558
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/soft/compilers/llvm/master-20200711/bin/clang+++0x2dd8558)
#30 0x00000000009faf03 main
(/soft/compilers/llvm/master-20200711/bin/clang+++0x9faf03)
#31 0x00007f688efda3d5 __libc_start_main (/lib64/libc.so.6+0x223d5)
#32 0x00000000009f832d _start
(/soft/compilers/llvm/master-20200711/bin/clang+++0x9f832d)
clang-11: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 11.0.0
(/gpfs/jlse-fs0/users/yeluo/opt/llvm-clang/llvm-project/clang
8f183d9f3d13d66a679bd449b1f5d34942560028)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /soft/compilers/llvm/master-20200711/bin
clang-11: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-11: note: diagnostic msg: /tmp/DiracDeterminant-a5e2c0.cpp
clang-11: note: diagnostic msg: /tmp/DiracDeterminant-a5e2c0.sh
clang-11: note: diagnostic msg: 

********************

-- 
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/20200711/99c9b622/attachment-0001.html>


More information about the llvm-bugs mailing list