[PATCH] D97430: [SanitizerCoverage] Drop !associated on metadata sections

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 25 16:46:14 PDT 2021


MaskRay added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/Instrumentation.cpp:76
 
-Comdat *llvm::GetOrCreateFunctionComdat(Function &F, Triple &T,
-                                        const std::string &ModuleId) {
----------------
ychen wrote:
> Internally, I saw this failure https://github.com/llvm/llvm-project/blob/a6a57f03be40cf2c546805155624a206649092ec/llvm/lib/Linker/LinkModules.cpp#L181 that may be caused by this for a test built with `-fprofile-generate -flto` for ELF. According to the title and description of the patch, that seems an unintended behavior change. Just check in to see if it is obvious how to fix this. Will provide the reproducer once it is available.
Is it called by the legacy LTO implementation `LTOCodeGenerator::addModule`? I guess new LTO does not exercise the code path.

I guess the fix is to ignore deduplication feature in `ModuleLinker::run` `ComdatsChosen`. `comdat nodeduplicates` was added to ELF this year.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97430



More information about the llvm-commits mailing list