google-yfyang wrote:
This is causing quite a few clang crashes with internal google code that are
built with fdo and thinlto enabled. We don't have a reproducer yet that can be
shared externally but here is the modified crash stack trace when running with
clang-checked.
`F0000 00:00:1780000217.029498 1750196 logging.cc:52] assert.h assertion failed
atllvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp:5902 in bool
llvm::MemProfContextDisambiguation::applyImport(Module &): GVSummary &&
GVSummary->modulePath() == SrcModule
*** Check failure stack trace: ***
@ 0x56372f6cfda4 absl::log_internal::LogMessage::SendToLog()
@ 0x56372f6cfd65 absl::log_internal::LogMessage::Flush()
@ 0x56372f8b1264 __assert_fail
@ 0x56372ded8b33 llvm::MemProfContextDisambiguation::applyImport()
@ 0x56372dee1e68 llvm::MemProfContextDisambiguation::run()
@ 0x56372f327c39 llvm::PassManager<>::run()
@ 0x56372971e24b llvm::lto::opt()
@ 0x563729720dd4 llvm::lto::thinBackend()::$_1::operator()()
@ 0x563729720c71 llvm::lto::thinBackend()
@ 0x56372944f5b6 clang::emitBackendOutput()
@ 0x5637290f2a67 clang::CodeGenAction::ExecuteAction()
@ 0x563729f80aea clang::FrontendAction::Execute()
@ 0x563729ef152d clang::CompilerInstance::ExecuteAction()
@ 0x5637290ec68e clang::ExecuteCompilerInvocation()
@ 0x5637290df858 cc1_main()
@ 0x5637290dc959 ExecuteCC1Tool()
@ 0x5637290df10c llvm::function_ref<>::callback_fn<>()
@ 0x563729cafbbe llvm::function_ref<>::callback_fn<>()
@ 0x56372f50a41c llvm::CrashRecoveryContext::RunSafely()
@ 0x563729caf1a4 clang::driver::CC1Command::Execute()
@ 0x563729c65993 clang::driver::Compilation::ExecuteCommand()
@ 0x563729c65c1f clang::driver::Compilation::ExecuteJobs()
@ 0x563729c884c0 clang::driver::Driver::ExecuteCompilation()
@ 0x5637290dbf30 clang_main()
@ 0x5637290da27a main
@ 0x7fa5e8bb4f12 __libc_start_main
@ 0x5637290da1aa _start
PLEASE submit a bug report to http://go/clang-crash-bug and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: bin/clang-checked [arguments]
1. Running pass "memprof-context-disambiguation" on module
#0 0x000056372f55a44a llvm::sys::RunSignalHandlers()
(bin/clang-checked+0xb35a44a)
#1 0x000056372f50a711 CrashRecoverySignalHandler(int)
CrashRecoveryContext.cpp:0:0
#2 0x00007fa5e8d1cc60 __restore_rt (/usr/grte/v5/lib64/libpthread.so.0+0x14c60)
#3 0x00007fa5e8bc9161 gsignal (/usr/grte/v5/lib64/libc.so.6+0x76161)
#4 0x00007fa5e8bca477 abort (/usr/grte/v5/lib64/libc.so.6+0x77477)
#5 0x000056372f8b16ec absl::log_internal::LogMessage::FailWithoutStackTrace()
(bin/clang-checked+0xb6b16ec)
#6 0x000056372f6cfe09 (bin/clang-checked+0xb4cfe09)
#7 0x000056372f6cfd65 absl::log_internal::LogMessage::Flush()
(/bin/clang-checked+0xb4cfd65)
#8 0x000056372f8b1264 __assert_fail (bin/clang-checked+0xb6b1264)
#9 0x000056372ded8b33
llvm::MemProfContextDisambiguation::applyImport(llvm::Module&)
(bin/clang-checked+0x9cd8b33)
#10 0x000056372dee1e68 llvm::MemProfContextDisambiguation::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&) (bin/clang-checked+0x9ce1e68)
#11 0x000056372f327c39 llvm::PassManager<llvm::Module,
llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&) (bin/clang-checked+0xb127c39)
#12 0x000056372971e24b llvm::lto::opt(llvm::lto::Config const&,
llvm::TargetMachine*, unsigned int, llvm::Module&, bool,
llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*,
std::__u::vector<unsigned char, std::__u::allocator<unsigned char>> const&,
llvm::ArrayRef<llvm::StringRef>) (bin/clang-checked+0x551e24b)
#13 0x0000563729720dd4 llvm::lto::thinBackend(llvm::lto::Config const&,
unsigned int,
std::__u::function<llvm::Expected<std::__u::unique_ptr<llvm::CachedFileStream,
std::__u::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine
const&)>, llvm::Module&, llvm::ModuleSummaryIndex const&,
llvm::FunctionImporter::ImportMapTy const&, llvm::DenseMap<unsigned long,
llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>,
llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&,
llvm::MapVector<llvm::StringRef, llvm::BitcodeModule,
llvm::DenseMap<llvm::StringRef, unsigned int,
llvm::DenseMapInfo<llvm::StringRef, void>,
llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>,
llvm::SmallVector<std::__u::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>,
0u>*, bool, llvm::ArrayRef<llvm::StringRef>,
std::__u::function<llvm::Expected<std::__u::unique_ptr<llvm::CachedFileStream,
std::__u::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine
const&)>, std::__u::vector<unsigned char, std::__u::allocator<unsigned char>>
const&)::$_1::operator()(llvm::Module&, llvm::TargetMachine*,
llvm::LLVMRemarkFileHandle) const LTOBackend.cpp:0:0
#14 0x0000563729720c71 llvm::lto::thinBackend(llvm::lto::Config const&,
unsigned int,
std::__u::function<llvm::Expected<std::__u::unique_ptr<llvm::CachedFileStream,
std::__u::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine
const&)>, llvm::Module&, llvm::ModuleSummaryIndex const&,
llvm::FunctionImporter::ImportMapTy const&, llvm::DenseMap<unsigned long,
llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>,
llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&,
llvm::MapVector<llvm::StringRef, llvm::BitcodeModule,
llvm::DenseMap<llvm::StringRef, unsigned int,
llvm::DenseMapInfo<llvm::StringRef, void>,
llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>,
llvm::SmallVector<std::__u::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>,
0u>*, bool, llvm::ArrayRef<llvm::StringRef>,
std::__u::function<llvm::Expected<std::__u::unique_ptr<llvm::CachedFileStream,
std::__u::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine
const&)>, std::__u::vector<unsigned char, std::__u::allocator<unsigned char>>
const&) (bin/clang-checked+0x5520c71)
#15 0x000056372944f5b6 clang::emitBackendOutput(clang::CompilerInstance&,
clang::CodeGenOptions&, llvm::StringRef, llvm::Module*, clang::BackendAction,
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>,
std::__u::unique_ptr<llvm::raw_pwrite_stream,
std::__u::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*)
(bin/clang-checked+0x524f5b6)
#16 0x00005637290f2a67 clang::CodeGenAction::ExecuteAction()
(bin/clang-checked+0x4ef2a67)
#17 0x0000563729f80aea clang::FrontendAction::Execute()
(bin/clang-checked+0x5d80aea)
#18 0x0000563729ef152d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(bin/clang-checked+0x5cf152d)
#19 0x00005637290ec68e
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(bin/clang-checked+0x4eec68e)
#20 0x00005637290df858 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (bin/clang-checked+0x4edf858)
#21 0x00005637290dc959 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&,
llvm::ToolContext const&, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>)
driver.cpp:0:0
#22 0x00005637290df10c int llvm::function_ref<int (llvm::SmallVectorImpl<char
const*>&)>::callback_fn<clang_main(int, char**, llvm::ToolContext
const&)::$_0>(long, llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#23 0x0000563729cafbbe void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__u::optional<llvm::StringRef>>,
std::__u::basic_string<char, std::__u::char_traits<char>,
std::__u::allocator<char>>*, bool*) const::$_0>(long) Job.cpp:0:0
#24 0x000056372f50a41c
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(bin/clang-checked+0xb30a41c)
#25 0x0000563729caf1a4
clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__u::optional<llvm::StringRef>>,
std::__u::basic_string<char, std::__u::char_traits<char>,
std::__u::allocator<char>>*, bool*) const (bin/clang-checked+0x5aaf1a4)
#26 0x0000563729c65993
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&, bool) const (bin/clang-checked+0x5a65993)
#27 0x0000563729c65c1f
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::__u::pair<int, clang::driver::Command const*>>&,
bool) const (bin/clang-checked+0x5a65c1f)
#28 0x0000563729c884c0
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::__u::pair<int, clang::driver::Command const*>>&)
(bin/clang-checked+0x5a884c0)
#29 0x00005637290dbf30 clang_main(int, char**, llvm::ToolContext const&)
(bin/clang-checked+0x4edbf30)
#30 0x00005637290da27a main (bin/clang-checked+0x4eda27a)
#31 0x00007fa5e8bb4f12 __libc_start_main (/usr/grte/v5/lib64/libc.so.6+0x61f12)
#32 0x00005637290da1aa _start
/usr/grte/v5/debug-src/src/csu/../sysdeps/x86_64/start.S:122:0
clang-checked: error: clang frontend command failed due to signal (use -v to
see invocation)
google3 clang version 9999.0.0 (db9b595ae3b30d67bd4068f80c651f97eb4dea2d)
Target: x86_64-grtev4-linux-gnu
Thread model: posix`
https://github.com/llvm/llvm-project/pull/184065
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits