[PATCH] D146987: [Assignment Tracking] Enable by default

Mikael Holmén via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 3 01:40:11 PDT 2023


uabelho added a comment.

We've also seen  crashes with this patch, e.g.

  clang -cc1 -triple x86_64-unknown-linux -emit-obj -debug-info-kind=constructor -O1 bbi-80938.c

crashes with

  clang: ../include/llvm/ADT/IntervalMap.h:1187: bool llvm::IntervalMap<unsigned int, unsigned int, 16, llvm::IntervalMapHalfOpenInfo<unsigned int> >::overlaps(KeyT, KeyT) const [KeyT = unsigned int, ValT = unsigned int, N = 16, Traits = llvm::IntervalMapHalfOpenInfo<unsigned int>]: Assertion `Traits::nonEmpty(a, b)' failed.
  PLEASE submit a bug report to https://developer.internal.ericsson.com/docs/bbi/languages/support/ and include the crash backtrace, preprocessed source, and associated run script.
  Stack dump:
  0.	Program arguments: build-all/bin/clang -cc1 -triple x86_64-unknown-linux -emit-obj -debug-info-kind=constructor -O1 bbi-80938.c
  1.	<eof> parser at end of file
  2.	Code generation
  3.	Running pass 'Function Pass Manager' on module 'bbi-80938.c'.
  4.	Running pass 'Assignment Tracking Analysis' on function '@main'
   #0 0x0000000003213388 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (build-all/bin/clang+0x3213388)
   #1 0x0000000003210f1e llvm::sys::RunSignalHandlers() (build-all/bin/clang+0x3210f1e)
   #2 0x0000000003213a06 SignalHandler(int) Signals.cpp:0:0
   #3 0x00007f483e5c8630 __restore_rt sigaction.c:0:0
   #4 0x00007f483bd0f387 raise (/lib64/libc.so.6+0x36387)
   #5 0x00007f483bd10a78 abort (/lib64/libc.so.6+0x37a78)
   #6 0x00007f483bd081a6 __assert_fail_base (/lib64/libc.so.6+0x2f1a6)
   #7 0x00007f483bd08252 (/lib64/libc.so.6+0x2f252)
   #8 0x0000000002a749e9 llvm::IntervalMap<unsigned int, unsigned int, 16u, llvm::IntervalMapHalfOpenInfo<unsigned int>>::overlaps(unsigned int, unsigned int) const crtstuff.c:0:0
   #9 0x0000000002a5e420 (anonymous namespace)::MemLocFragmentFill::run(FunctionVarLocsBuilder*) AssignmentTrackingAnalysis.cpp:0:0
  #10 0x0000000002a567b9 llvm::AssignmentTrackingAnalysis::runOnFunction(llvm::Function&) (build-all/bin/clang+0x2a567b9)
  #11 0x0000000002bd91bf llvm::FPPassManager::runOnFunction(llvm::Function&) (build-all/bin/clang+0x2bd91bf)
  #12 0x0000000002be00c8 llvm::FPPassManager::runOnModule(llvm::Module&) (build-all/bin/clang+0x2be00c8)
  #13 0x0000000002bd9787 llvm::legacy::PassManagerImpl::run(llvm::Module&) (build-all/bin/clang+0x2bd9787)
  #14 0x00000000034187fe clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) (build-all/bin/clang+0x34187fe)
  #15 0x000000000432c062 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) crtstuff.c:0:0
  #16 0x0000000004dfeb53 clang::ParseAST(clang::Sema&, bool, bool) (build-all/bin/clang+0x4dfeb53)
  #17 0x0000000003c363e6 clang::FrontendAction::Execute() (build-all/bin/clang+0x3c363e6)
  #18 0x0000000003ba1724 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (build-all/bin/clang+0x3ba1724)
  #19 0x0000000003cfbafb clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (build-all/bin/clang+0x3cfbafb)
  #20 0x0000000000a5b1fc cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (build-all/bin/clang+0xa5b1fc)
  #21 0x0000000000a57050 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
  #22 0x0000000000a55087 clang_main(int, char**, llvm::ToolContext const&) (build-all/bin/clang+0xa55087)
  #23 0x0000000000a66c91 main (build-all/bin/clang+0xa66c91)
  #24 0x00007f483bcfb555 __libc_start_main (/lib64/libc.so.6+0x22555)
  #25 0x0000000000a5277b _start (build-all/bin/clang+0xa5277b)
  Abort (core dumped)

I've no idea if thiis is the same problem already reported above or not.
F26992749: bbi-80938.c <https://reviews.llvm.org/F26992749>


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146987



More information about the cfe-commits mailing list