[PATCH] D138846: MC/DC in LLVM Source-Based Code Coverage: LLVM back-end and compiler-rt

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 10 04:17:19 PST 2023


hans added a comment.

In D138846#4656594 <https://reviews.llvm.org/D138846#4656594>, @hans wrote:

> Just a heads up that we're seeing crashes in the Rust compiler which bisects to this change. Investigating in https://bugs.chromium.org/p/chromium/issues/detail?id=1500558

Here's a small reproducer:

  $ cat /tmp/x.ll
  target triple = "x86_64-unknown-linux-gnu"
  
  declare void @llvm.instrprof.increment(ptr %0, i64 %1, i32 %2, i32 %3)
  @prof_name = private constant [9 x i8] c"prof_name"
  
  define internal void @f() {
    call void @llvm.instrprof.increment(ptr @prof_name, i64 123456, i32 32, i32 0)
    ret void
  }
  
  define void @foo() {
    call void @f()
    ret void
  }
  
  define void @bar() {
    call void @f()
    ret void
  }
  
  $ build/bin/opt /tmp/x.ll -passes='cgscc(inline),instrprof' -S
  PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
  Stack dump:
  0.      Program arguments: build/bin/opt /tmp/x.ll -passes=cgscc(inline),instrprof -S
   #0 0x000055fcf4193d48 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (build/bin/opt+0x2f77d48)
   #1 0x000055fcf419186e llvm::sys::RunSignalHandlers() (build/bin/opt+0x2f7586e)
   #2 0x000055fcf41943fd SignalHandler(int) Signals.cpp:0:0
   #3 0x00007f0cbe05a510 (/lib/x86_64-linux-gnu/libc.so.6+0x3c510)
   #4 0x000055fcf3b279c9 llvm::GlobalVariable::eraseFromParent() (build/bin/opt+0x290b9c9)
   #5 0x000055fcf47a87c8 llvm::InstrProfiling::emitNameData() (build/bin/opt+0x358c7c8)
   #6 0x000055fcf47a32e3 llvm::InstrProfiling::run(llvm::Module&, std::function<llvm::TargetLibraryInfo const& (llvm::Function&)>) (build/bin/opt+0x35872e3)
   #7 0x000055fcf47a2b99 llvm::InstrProfiling::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (build/bin/opt+0x3586b99)
   #8 0x000055fcf43a31ed llvm::detail::PassModel<llvm::Module, llvm::InstrProfiling, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (build/bin/opt+0x31871ed)
   #9 0x000055fcf3bacf04 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (build/bin/opt+0x2990f04)
  #10 0x000055fcf1b479db llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool) (build/bin/opt+0x92b9db)
  #11 0x000055fcf1b54e95 main (build/bin/opt+0x938e95)
  #12 0x00007f0cbe0456ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
  #13 0x00007f0cbe045785 call_init ./csu/../csu/libc-start.c:128:20
  #14 0x00007f0cbe045785 __libc_start_main ./csu/../csu/libc-start.c:347:5
  #15 0x000055fcf1b4156a _start (build/bin/opt+0x92556a)
  Segmentation fault


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138846



More information about the cfe-commits mailing list