[PATCH] D111109: AddGlobalAnnotations for function with or without function body.

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 19 07:21:35 PDT 2021


alexfh added a comment.

It looks like this patch causes clang to crash on valid code with the following stack trace:

   #0 0x0000560442f12f45 SignalHandler(int)
   #1 0x00007ffac7c789a0 __restore_rt
   #2 0x0000560440083992 llvm::LazyCallGraph::Node::populateSlow()
   #3 0x0000560440082a60 llvm::LazyCallGraph::buildRefSCCs()
   #4 0x000056043fef166d llvm::ModuleToPostOrderCGSCCPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) 
   #5 0x000056043f8852f2 llvm::detail::PassModel<llvm::Module, llvm::ModuleToPostOrderCGSCCPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) 
   #6 0x000056043f617204 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&)
   #7 0x000056043f616e34 llvm::ModuleInlinerWrapperPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) 
   #8 0x000056043f616cb2 llvm::detail::PassModel<llvm::Module, llvm::ModuleInlinerWrapperPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) 
   #9 0x000056043f617204 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&)
  #10 0x0000560440100459 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::__u::unique_ptr<llvm::raw_pwrite_stream, std::__u::default_delete<llvm::raw_pwrite_stream> >&, std::__u::unique_ptr<llvm::ToolOutputFile, std::__u::default_delete<llvm::ToolOutputFile> >&)
  #11 0x000056043f63dff7 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::__u::unique_ptr<llvm::raw_pwrite_stream, std::__u::default_delete<llvm::raw_pwrite_stream> >)
  #12 0x00005604400f6703 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) 
  #13 0x000056043f638300 clang::ParseAST(clang::Sema&, bool, bool)
  #14 0x000056043f6f96d5 clang::FrontendAction::Execute()
  #15 0x000056043f6f9515 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) 
  #16 0x000056043f6f9381 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) 
  #17 0x00005604400b84f8 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) 
  #18 0x000056043f7a7a79 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
  #19 0x000056043ff4b6f4 main
  #20 0x00007ffac7ae6bbd __libc_start_main
  #21 0x000056043f815679 _start

Working on a reduced test.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111109/new/

https://reviews.llvm.org/D111109



More information about the cfe-commits mailing list