Skip to content

[NFCI][LTO][lld] Optimize away symbol copies within LTO global resolution in ELF #106193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 8, 2024

Conversation

mingmingl-llvm
Copy link
Contributor

@mingmingl-llvm mingmingl-llvm commented Aug 27, 2024

StringMap<T> creates a copy of the string for entry insertions and intentionally keep copies since the implementation optimizes string memory usage. On the other hand, linker keeps copies of symbol names [1] in lld::elf::parseFiles [2] before invoking compileBitcodeFiles [3].

This change proposes to optimize away string copies inside LTO::GlobalResolutions, which will make LTO indexing more memory efficient for ELF. There are similar opportunities for other (COFF, wasm, MachO) formats.

The optimization takes place for lld (ELF) only. For the rest of use cases (gold plugin, llvm-lto2, etc), LTO owns a string saver to keep copies and use global resolution key for de-duplication.

Together with @kazutakahirata's work to make ComputeCrossModuleImport more memory efficient, we see a ~20% peak memory usage reduction in a binary where peak memory usage needs to go down. Thanks to the optimization in 329ba52, the max (as opposed to the sum) of ComputeCrossModuleImport or GlobalResolution shows up in peak memory usage.

  • Regarding correctness, the set of resolved per-module symbols is a subset of llvm::lto::InputFile::Symbols. And bitcode symbol parsing saves symbol name when iterating obj->symbols in BitcodeFile::parse already. This change updates BitcodeFile::parseLazy to keep copies of per-module undefined symbols.
  • Presumably the undefined symbols in a LTO unit (copied in this patch in linker unique saver) is a small set compared with the set of symbols in global-resolution (copied before this patch), making this a worthwhile trade-off. Benchmarking this change alone shows measurable memory savings across various benchmarks.

[1] ELF

sym = symtab.insert(saver().save(objSym.getName()));

[2]
parseFiles(files, armCmseImpLib);

[3]
compileBitcodeFiles<ELFT>(skipLinkedOutput);

@mingmingl-llvm mingmingl-llvm changed the title [NFCI]Use DenseMap<StringRef, ValueType> for global resolution [NFCI][LTO][lld] Save symbol copies in LTO global resolution Aug 30, 2024
@mingmingl-llvm mingmingl-llvm changed the title [NFCI][LTO][lld] Save symbol copies in LTO global resolution [NFCI][LTO][lld] Optimize away symbol copies within LTO global resolution in ELF Aug 30, 2024
@mingmingl-llvm mingmingl-llvm marked this pull request as ready for review August 30, 2024 06:31
@llvmbot llvmbot added lld lld:ELF LTO Link time optimization (regular/full LTO or ThinLTO) llvm:support labels Aug 30, 2024
@llvmbot
Copy link
Member

llvmbot commented Aug 30, 2024

@llvm/pr-subscribers-lto
@llvm/pr-subscribers-lld
@llvm/pr-subscribers-lld-elf

@llvm/pr-subscribers-llvm-support

Author: Mingming Liu (minglotus-6)

Changes

StringMap&lt;T&gt; creates a copy of the string for entry insertions and intentionally keep copies since the implementation optimizes string memory usage. On the other hand, linker context owned string saver keeps copies [1] of symbol names when parsing bitcode files.

This change proposes to optimize away string copies inside LTO::GlobalResolutions, which will make LTO indexing more memory efficient for ELF. There are similar opportunities for other (COFF, wasm, MachO) formats but I'm not familiar with them enough or have enough testing capability.

The optimization takes place for lld (ELF) only. For the rest of use cases (gold plugin, llvm-lto2, etc), LTO owns a string saver to keep copies and use global resolution key for de-duplication.

Together with @kazutakahirata's work to make ComputeCrossModuleImport more memory efficient, we see a ~20% peak memory usage reduction. Thanks to 329ba52, either ComputeCrossModuleImport or GlobalResolution shows up in peak memory usage.

[1] ELF

sym = symtab.insert(saver().save(objSym.getName()));


Full diff: https://github.com/llvm/llvm-project/pull/106193.diff

5 Files Affected:

  • (modified) lld/ELF/LTO.cpp (+1)
  • (modified) llvm/include/llvm/LTO/Config.h (+5)
  • (modified) llvm/include/llvm/LTO/LTO.h (+13-2)
  • (modified) llvm/include/llvm/Support/Allocator.h (+1)
  • (modified) llvm/lib/LTO/LTO.cpp (+21-3)
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index 935d0a9eab9ee0..f339f1c2c0ec21 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -135,6 +135,7 @@ static lto::Config createConfig() {
       config->ltoValidateAllVtablesHaveTypeInfos;
   c.AllVtablesHaveTypeInfos = ctx.ltoAllVtablesHaveTypeInfos;
   c.AlwaysEmitRegularLTOObj = !config->ltoObjPath.empty();
+  c.KeepSymbolNameCopies = false;
 
   for (const llvm::StringRef &name : config->thinLTOModulesToCompile)
     c.ThinLTOModulesToCompile.emplace_back(name);
diff --git a/llvm/include/llvm/LTO/Config.h b/llvm/include/llvm/LTO/Config.h
index 482b6e55a19d35..a49cce9f30e20c 100644
--- a/llvm/include/llvm/LTO/Config.h
+++ b/llvm/include/llvm/LTO/Config.h
@@ -88,6 +88,11 @@ struct Config {
   /// want to know a priori all possible output files.
   bool AlwaysEmitRegularLTOObj = false;
 
+  /// If true, the LTO instance creates copies of the symbol names for LTO::run.
+  /// The lld linker uses string saver to keep symbol names alive and doesn't
+  /// need to create copies, so it can set this field to false.
+  bool KeepSymbolNameCopies = true;
+
   /// Allows non-imported definitions to get the potentially more constraining
   /// visibility from the prevailing definition. FromPrevailing is the default
   /// because it works for many binary formats. ELF can use the more optimized
diff --git a/llvm/include/llvm/LTO/LTO.h b/llvm/include/llvm/LTO/LTO.h
index 30eda34cd7ba54..7282e7bbcf451c 100644
--- a/llvm/include/llvm/LTO/LTO.h
+++ b/llvm/include/llvm/LTO/LTO.h
@@ -15,6 +15,9 @@
 #ifndef LLVM_LTO_LTO_H
 #define LLVM_LTO_LTO_H
 
+#include <memory>
+
+#include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/Bitcode/BitcodeReader.h"
@@ -23,6 +26,7 @@
 #include "llvm/Object/IRSymtab.h"
 #include "llvm/Support/Caching.h"
 #include "llvm/Support/Error.h"
+#include "llvm/Support/StringSaver.h"
 #include "llvm/Support/thread.h"
 #include "llvm/Transforms/IPO/FunctionAttrs.h"
 #include "llvm/Transforms/IPO/FunctionImport.h"
@@ -36,6 +40,7 @@ class MemoryBufferRef;
 class Module;
 class raw_pwrite_stream;
 class ToolOutputFile;
+class UniqueStringSaver;
 
 /// Resolve linkage for prevailing symbols in the \p Index. Linkage changes
 /// recorded in the index and the ThinLTO backends must apply the changes to
@@ -348,6 +353,11 @@ class LTO {
     DenseMap<GlobalValue::GUID, StringRef> PrevailingModuleForGUID;
   } ThinLTO;
 
+  std::unique_ptr<llvm::BumpPtrAllocator> Alloc;
+
+  // Symbol saver for global resolution map.
+  std::unique_ptr<llvm::StringSaver> GlobalResolutionSymbolSaver;
+
   // The global resolution for a particular (mangled) symbol name. This is in
   // particular necessary to track whether each symbol can be internalized.
   // Because any input file may introduce a new cross-partition reference, we
@@ -406,9 +416,10 @@ class LTO {
   };
 
   // Global mapping from mangled symbol names to resolutions.
-  // Make this an optional to guard against accessing after it has been reset
+  // Make this an unique_ptr to guard against accessing after it has been reset
   // (to reduce memory after we're done with it).
-  std::optional<StringMap<GlobalResolution>> GlobalResolutions;
+  std::unique_ptr<llvm::DenseMap<StringRef, GlobalResolution>>
+      GlobalResolutions;
 
   void addModuleToGlobalRes(ArrayRef<InputFile::Symbol> Syms,
                             ArrayRef<SymbolResolution> Res, unsigned Partition,
diff --git a/llvm/include/llvm/Support/Allocator.h b/llvm/include/llvm/Support/Allocator.h
index 568f0d34032fa2..3c54556bfefd34 100644
--- a/llvm/include/llvm/Support/Allocator.h
+++ b/llvm/include/llvm/Support/Allocator.h
@@ -22,6 +22,7 @@
 #include "llvm/Support/AllocatorBase.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/MathExtras.h"
+#include "llvm/Support/raw_ostream.h"
 #include <algorithm>
 #include <cassert>
 #include <cstddef>
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index bb3c9f7acdb8e5..dcba01d4cc05ee 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -78,6 +78,10 @@ cl::opt<bool> EnableLTOInternalization(
     "enable-lto-internalization", cl::init(true), cl::Hidden,
     cl::desc("Enable global value internalization in LTO"));
 
+static cl::opt<bool>
+    LTOKeepSymbolCopies("lto-keep-symbol-copies", cl::init(false), cl::Hidden,
+                        cl::desc("Keep copies of symbols in LTO indexing"));
+
 /// Indicate we are linking with an allocator that supports hot/cold operator
 /// new interfaces.
 extern cl::opt<bool> SupportsHotColdNew;
@@ -607,8 +611,14 @@ LTO::LTO(Config Conf, ThinBackend Backend,
     : Conf(std::move(Conf)),
       RegularLTO(ParallelCodeGenParallelismLevel, this->Conf),
       ThinLTO(std::move(Backend)),
-      GlobalResolutions(std::make_optional<StringMap<GlobalResolution>>()),
-      LTOMode(LTOMode) {}
+      GlobalResolutions(
+          std::make_unique<DenseMap<StringRef, GlobalResolution>>()),
+      LTOMode(LTOMode) {
+  if (Conf.KeepSymbolNameCopies || LTOKeepSymbolCopies) {
+    Alloc = std::make_unique<BumpPtrAllocator>();
+    GlobalResolutionSymbolSaver = std::make_unique<llvm::StringSaver>(*Alloc);
+  }
+}
 
 // Requires a destructor for MapVector<BitcodeModule>.
 LTO::~LTO() = default;
@@ -626,7 +636,12 @@ void LTO::addModuleToGlobalRes(ArrayRef<InputFile::Symbol> Syms,
     assert(ResI != ResE);
     SymbolResolution Res = *ResI++;
 
-    auto &GlobalRes = (*GlobalResolutions)[Sym.getName()];
+    StringRef SymbolName = Sym.getName();
+    // Keep copies of symbols if the client of LTO says so.
+    if (GlobalResolutionSymbolSaver && !GlobalResolutions->contains(SymbolName))
+      SymbolName = GlobalResolutionSymbolSaver->save(SymbolName);
+
+    auto &GlobalRes = (*GlobalResolutions)[SymbolName];
     GlobalRes.UnnamedAddr &= Sym.isUnnamedAddr();
     if (Res.Prevailing) {
       assert(!GlobalRes.Prevailing &&
@@ -1797,6 +1812,9 @@ Error LTO::runThinLTO(AddStreamFn AddStream, FileCache Cache,
   // cross module importing, which adds to peak memory via the computed import
   // and export lists.
   GlobalResolutions.reset();
+  // Reset the bump pointer allocator to release its memory.
+  GlobalResolutionSymbolSaver.reset();
+  Alloc.reset();
 
   if (Conf.OptLevel > 0)
     ComputeCrossModuleImport(ThinLTO.CombinedIndex, ModuleToDefinedGVSummaries,

@@ -22,6 +22,7 @@
#include "llvm/Support/AllocatorBase.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this needed or was it added earlier for debugging?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added for debugging. I removed it.

@mingmingl-llvm mingmingl-llvm requested a review from jvoung August 30, 2024 17:07
@mingmingl-llvm
Copy link
Contributor Author

When a bitcode file is parsed lazily [1], undefined symbols in a module won't get saved. In a LTO unit, a symbol is saved as long as one module defines it.

I'll add some logs in LTO class to see how undefined symbols are resolved. If LTO cannot rely on string savers' copies for undefined symbols, it needs to keep copies of undefined symbols itself (still a subset).

[1]

// True if this is a relocatable object file/bitcode file in an ar archive
// or between --start-lib and --end-lib.
bool lazy = false;

Comment on lines +639 to +644
StringRef SymbolName = Sym.getName();
// Keep copies of symbols if the client of LTO says so.
if (GlobalResolutionSymbolSaver && !GlobalResolutions->contains(SymbolName))
SymbolName = GlobalResolutionSymbolSaver->save(SymbolName);

auto &GlobalRes = (*GlobalResolutions)[SymbolName];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A somewhat nit picky suggestion, but should we create a wrapper class for llvm::DenseMap<StringRef, GlobalResolution>? This way, we can intercept its operator()[] and put all the deduplication logic there.

This way, the application logic should stay clear. That is:

auto &GlobalRes = (*GlobalResolutions)[Sym.getName()];

staying as is.

We should be able to put members like:

  std::unique_ptr<llvm::BumpPtrAllocator> Alloc;

  // Symbol saver for global resolution map.
  std::unique_ptr<llvm::StringSaver> GlobalResolutionSymbolSaver;

into the wrapper class and probably strip away std::unique_ptr from them, which in turn should let you remove:

  GlobalResolutionSymbolSaver.reset();
  Alloc.reset();

below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a helper method LTO::releaseGlobalResolutionsMemory which releases the memory used by GlobalResolutions together. I'm not sure if having a wrapper class has the correct ROI for code simplicity here as reader also need to parse the added logic of wrapper class.

@@ -78,6 +78,10 @@ cl::opt<bool> EnableLTOInternalization(
"enable-lto-internalization", cl::init(true), cl::Hidden,
cl::desc("Enable global value internalization in LTO"));

static cl::opt<bool>
LTOKeepSymbolCopies("lto-keep-symbol-copies", cl::init(false), cl::Hidden,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is an option needed? I think this can just be set through the config.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a back-up option in case this change hit any corner case (missed a symbol) but not caught in release. Though all symbols used by GlobalResolutions should be covered by looking at the code.

@mingmingl-llvm
Copy link
Contributor Author

When a bitcode file is parsed lazily [1], undefined symbols in a module won't get saved. In a LTO unit, a symbol is saved as long as one module defines it.

I'll add some logs in LTO class to see how undefined symbols are resolved. If LTO cannot rely on string savers' copies for undefined symbols, it needs to keep copies of undefined symbols itself (still a subset).

In the updated PR, BitcodeFile::parseLazy keeps copies of undefined symbols in a module (dbfb00c#diff-1a6e8fdd6339ca831ba81ed9fb4f94c42419f91d67c9e16322b71a3e011b42d2R1804-R1807). Now this PR should land after #106670.

Experiment data are collected on two benchmarks, stacking this PR on top of #106670

Copy link
Contributor

@teresajohnson teresajohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs an update after #106670 being merged? I don't have a strong feeling on the wrapper class suggested by @kazutakahirata but lgtm otherwise with a small suggestion below.

} else {
// Keep copies of per-module undefined symbols for LTO::GlobalResolutions
// usage.
[[maybe_unused]] StringRef SymbolRef =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than the maybe_unused, can you just not assign the return value to a variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

Copy link
Contributor

@jvoung jvoung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG too aside from a small suggestion

Nice memory savings!

@@ -348,6 +352,11 @@ class LTO {
DenseMap<GlobalValue::GUID, StringRef> PrevailingModuleForGUID;
} ThinLTO;

std::unique_ptr<llvm::BumpPtrAllocator> Alloc;

// Symbol saver for global resolution map.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to group these closer to GlobalResolutions map? The comment helps refer to it, but right now is separated by the "struct GlobalResolution" definition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@mingmingl-llvm mingmingl-llvm merged commit 9ade4e2 into llvm:main Sep 8, 2024
8 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 8, 2024

LLVM Buildbot has detected a new failure on builder openmp-offload-libc-amdgpu-runtime running on omp-vega20-1 while building lld,llvm at step 10 "Add check check-offload".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/5169

Here is the relevant piece of the build log for the reference
Step 10 (Add check check-offload) failure: test (failure)
******************** TEST 'libomptarget :: amdgcn-amd-amdhsa :: sanitizer/ptr_outside_alloc_2.c' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./bin/clang -fopenmp    -I /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/offload/test -I /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -L /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./lib -L /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src  -nogpulib -Wl,-rpath,/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -Wl,-rpath,/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./lib  -fopenmp-targets=amdgcn-amd-amdhsa -O3 /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/offload/test/sanitizer/ptr_outside_alloc_2.c -o /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/sanitizer/Output/ptr_outside_alloc_2.c.tmp /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./lib/libomptarget.devicertl.a
# executed command: /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./bin/clang -fopenmp -I /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/offload/test -I /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -L /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./lib -L /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -nogpulib -Wl,-rpath,/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -Wl,-rpath,/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./lib -fopenmp-targets=amdgcn-amd-amdhsa -O3 /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/offload/test/sanitizer/ptr_outside_alloc_2.c -o /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/sanitizer/Output/ptr_outside_alloc_2.c.tmp /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./lib/libomptarget.devicertl.a
# RUN: at line 3
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./bin/not --crash env -u LLVM_DISABLE_SYMBOLIZATION OFFLOAD_TRACK_ALLOCATION_TRACES=1 /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/sanitizer/Output/ptr_outside_alloc_2.c.tmp 2>&1 | /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./bin/FileCheck /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/offload/test/sanitizer/ptr_outside_alloc_2.c --check-prefixes=CHECK
# executed command: /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./bin/not --crash env -u LLVM_DISABLE_SYMBOLIZATION OFFLOAD_TRACK_ALLOCATION_TRACES=1 /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/sanitizer/Output/ptr_outside_alloc_2.c.tmp
# executed command: /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./bin/FileCheck /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/offload/test/sanitizer/ptr_outside_alloc_2.c --check-prefixes=CHECK
# .---command stderr------------
# | /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/offload/test/sanitizer/ptr_outside_alloc_2.c:21:11: error: CHECK: expected string not found in input
# | // CHECK: OFFLOAD ERROR: Memory access fault by GPU {{.*}} (agent 0x{{.*}}) at virtual address [[PTR:0x[0-9a-z]*]]. Reasons: {{.*}}
# |           ^
# | <stdin>:1:1: note: scanning from here
# | AMDGPU error: Error in hsa_amd_memory_pool_allocate: HSA_STATUS_ERROR_OUT_OF_RESOURCES: The runtime failed to allocate the necessary resources. This error may also occur when the core runtime library needs to spawn threads or create internal OS-specific events.
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/offload/test/sanitizer/ptr_outside_alloc_2.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |           1: AMDGPU error: Error in hsa_amd_memory_pool_allocate: HSA_STATUS_ERROR_OUT_OF_RESOURCES: The runtime failed to allocate the necessary resources. This error may also occur when the core runtime library needs to spawn threads or create internal OS-specific events. 
# | check:21     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |           2: AMDGPU error: Error in hsa_amd_memory_pool_allocate: HSA_STATUS_ERROR_OUT_OF_RESOURCES: The runtime failed to allocate the necessary resources. This error may also occur when the core runtime library needs to spawn threads or create internal OS-specific events. 
# | check:21     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           3: "PluginInterface" error: Failure to allocate device memory: Failed to allocate from memory manager 
# | check:21     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           4: omptarget error: Call to getTargetPointer returned null pointer (device failure or illegal mapping). 
# | check:21     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           5: omptarget error: Call to targetDataBegin failed, abort target. 
# | check:21     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           6: omptarget error: Failed to process data before launching the kernel. 
# | check:21     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           .
# |           .
# |           .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 8, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-fast running on sanitizer-buildbot4 while building lld,llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/2989

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 85621 of 85622 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80
FAIL: lld :: ELF/lto/asmundef.ll (27416 of 85621)
******************** TEST 'lld :: ELF/lto/asmundef.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-as /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-as /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
RUN: at line 3: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-as /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-as /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
RUN: at line 4: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
=================================================================
==4148783==ERROR: AddressSanitizer: heap-use-after-free on address 0x50d000004834 at pc 0x583de4250ff6 bp 0x7ffebf773270 sp 0x7ffebf772a18
READ of size 8 at 0x50d000004834 thread T0
    #0 0x583de4250ff5 in MemcmpInterceptorCommon(void*, int (*)(void const*, void const*, unsigned long), void const*, void const*, unsigned long) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:814:7
    #1 0x583de425143c in bcmp /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:859:10
    #2 0x583dea00e84f in operator== /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:883:12
    #3 0x583dea00e84f in isEqual /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:932:18
    #4 0x583dea00e84f in bool llvm::DenseMapBase<llvm::DenseMap<llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>, llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>::LookupBucketFor<llvm::StringRef>(llvm::StringRef const&, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>*&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:704:11
    #5 0x583de9fec3c8 in llvm::DenseMapBase<llvm::DenseMap<llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>, llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>::operator[](llvm::StringRef const&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:368:9
    #6 0x583de9feba32 in llvm::lto::LTO::addModuleToGlobalRes(llvm::ArrayRef<llvm::lto::InputFile::Symbol>, llvm::ArrayRef<llvm::lto::SymbolResolution>, unsigned int, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/LTO/LTO.cpp:624:23
    #7 0x583de9fee220 in llvm::lto::LTO::addModule(llvm::lto::InputFile&, unsigned int, llvm::lto::SymbolResolution const*&, llvm::lto::SymbolResolution const*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/LTO/LTO.cpp:763:3
    #8 0x583de9fed72e in llvm::lto::LTO::add(std::__1::unique_ptr<llvm::lto::InputFile, std::__1::default_delete<llvm::lto::InputFile>>, llvm::ArrayRef<llvm::lto::SymbolResolution>) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/LTO/LTO.cpp:725:21
    #9 0x583de4b08176 in lld::elf::BitcodeCompiler::add(lld::elf::BitcodeFile&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/ELF/LTO.cpp:277:22
    #10 0x583de489e273 in void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::endianness)1, true>>(bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/ELF/Driver.cpp:2521:10
    #11 0x583de48333b8 in void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::endianness)1, true>>(llvm::opt::InputArgList&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/ELF/Driver.cpp:2995:3
    #12 0x583de4802103 in lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/ELF/Driver.cpp:697:5
    #13 0x583de47fd631 in lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/ELF/Driver.cpp:175:19
    #14 0x583de44fbacf in lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/Common/DriverDispatcher.cpp:164:12
    #15 0x583de44fd0cf in operator() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/Common/DriverDispatcher.cpp:189:15
    #16 0x583de44fd0cf in void llvm::function_ref<void ()>::callback_fn<lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>)::$_0>(long) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
    #17 0x583de4362e11 in operator() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12
    #18 0x583de4362e11 in llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:426:3
    #19 0x583de44fc753 in lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/Common/DriverDispatcher.cpp:188:14
    #20 0x583de430ef86 in lld_main(int, char**, llvm::ToolContext const&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/tools/lld/lld.cpp:103:14
    #21 0x583de43105f5 in main /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/tools/lld/lld-driver.cpp:17:10
    #22 0x72638e62a1c9  (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6)
    #23 0x72638e62a28a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6)
Step 9 (stage2/asan_ubsan check) failure: stage2/asan_ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 85621 of 85622 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80
FAIL: lld :: ELF/lto/asmundef.ll (27416 of 85621)
******************** TEST 'lld :: ELF/lto/asmundef.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-as /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-as /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
RUN: at line 3: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-as /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-as /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
RUN: at line 4: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
=================================================================
==4148783==ERROR: AddressSanitizer: heap-use-after-free on address 0x50d000004834 at pc 0x583de4250ff6 bp 0x7ffebf773270 sp 0x7ffebf772a18
READ of size 8 at 0x50d000004834 thread T0
    #0 0x583de4250ff5 in MemcmpInterceptorCommon(void*, int (*)(void const*, void const*, unsigned long), void const*, void const*, unsigned long) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:814:7
    #1 0x583de425143c in bcmp /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:859:10
    #2 0x583dea00e84f in operator== /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:883:12
    #3 0x583dea00e84f in isEqual /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:932:18
    #4 0x583dea00e84f in bool llvm::DenseMapBase<llvm::DenseMap<llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>, llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>::LookupBucketFor<llvm::StringRef>(llvm::StringRef const&, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>*&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:704:11
    #5 0x583de9fec3c8 in llvm::DenseMapBase<llvm::DenseMap<llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>, llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>::operator[](llvm::StringRef const&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:368:9
    #6 0x583de9feba32 in llvm::lto::LTO::addModuleToGlobalRes(llvm::ArrayRef<llvm::lto::InputFile::Symbol>, llvm::ArrayRef<llvm::lto::SymbolResolution>, unsigned int, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/LTO/LTO.cpp:624:23
    #7 0x583de9fee220 in llvm::lto::LTO::addModule(llvm::lto::InputFile&, unsigned int, llvm::lto::SymbolResolution const*&, llvm::lto::SymbolResolution const*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/LTO/LTO.cpp:763:3
    #8 0x583de9fed72e in llvm::lto::LTO::add(std::__1::unique_ptr<llvm::lto::InputFile, std::__1::default_delete<llvm::lto::InputFile>>, llvm::ArrayRef<llvm::lto::SymbolResolution>) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/LTO/LTO.cpp:725:21
    #9 0x583de4b08176 in lld::elf::BitcodeCompiler::add(lld::elf::BitcodeFile&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/ELF/LTO.cpp:277:22
    #10 0x583de489e273 in void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::endianness)1, true>>(bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/ELF/Driver.cpp:2521:10
    #11 0x583de48333b8 in void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::endianness)1, true>>(llvm::opt::InputArgList&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/ELF/Driver.cpp:2995:3
    #12 0x583de4802103 in lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/ELF/Driver.cpp:697:5
    #13 0x583de47fd631 in lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/ELF/Driver.cpp:175:19
    #14 0x583de44fbacf in lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/Common/DriverDispatcher.cpp:164:12
    #15 0x583de44fd0cf in operator() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/Common/DriverDispatcher.cpp:189:15
    #16 0x583de44fd0cf in void llvm::function_ref<void ()>::callback_fn<lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>)::$_0>(long) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
    #17 0x583de4362e11 in operator() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12
    #18 0x583de4362e11 in llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:426:3
    #19 0x583de44fc753 in lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/Common/DriverDispatcher.cpp:188:14
    #20 0x583de430ef86 in lld_main(int, char**, llvm::ToolContext const&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/tools/lld/lld.cpp:103:14
    #21 0x583de43105f5 in main /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/tools/lld/lld-driver.cpp:17:10
    #22 0x72638e62a1c9  (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6)
    #23 0x72638e62a28a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6)
Step 12 (stage2/msan check) failure: stage2/msan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 85619 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90
FAIL: lld :: ELF/lto/asmundef.ll (36833 of 85619)
******************** TEST 'lld :: ELF/lto/asmundef.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/llvm-as /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/llvm-as /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
RUN: at line 3: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/llvm-as /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/llvm-as /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
RUN: at line 4: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld.lld /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld.lld /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
Uninitialized bytes in MemcmpInterceptorCommon at offset 0 inside [0x709000000734, 8)
==2829652==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x555559da4e45 in bcmp /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/msan/../sanitizer_common/sanitizer_common_interceptors.inc:859:10
    #1 0x555559e0db1f in llvm::operator==(llvm::StringRef, llvm::StringRef) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:883:12
    #2 0x55555d02a045 in bool llvm::DenseMapBase<llvm::DenseMap<llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>, llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>::LookupBucketFor<llvm::StringRef>(llvm::StringRef const&, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>*&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:704:11
    #3 0x55555d014bcc in llvm::DenseMapBase<llvm::DenseMap<llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>, llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>::operator[](llvm::StringRef const&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:368:9
    #4 0x55555d01466b in llvm::lto::LTO::addModuleToGlobalRes(llvm::ArrayRef<llvm::lto::InputFile::Symbol>, llvm::ArrayRef<llvm::lto::SymbolResolution>, unsigned int, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/LTO/LTO.cpp:624:23
    #5 0x55555d015bc7 in llvm::lto::LTO::addModule(llvm::lto::InputFile&, unsigned int, llvm::lto::SymbolResolution const*&, llvm::lto::SymbolResolution const*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/LTO/LTO.cpp:763:3
    #6 0x55555d015388 in llvm::lto::LTO::add(std::__1::unique_ptr<llvm::lto::InputFile, std::__1::default_delete<llvm::lto::InputFile>>, llvm::ArrayRef<llvm::lto::SymbolResolution>) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/LTO/LTO.cpp:725:21
    #7 0x55555a1fff54 in lld::elf::BitcodeCompiler::add(lld::elf::BitcodeFile&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/ELF/LTO.cpp:277:22
    #8 0x55555a0cd8cd in void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::endianness)1, true>>(bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/ELF/Driver.cpp:2521:10
    #9 0x55555a095da2 in void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::endianness)1, true>>(llvm::opt::InputArgList&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/ELF/Driver.cpp:2995:3
    #10 0x55555a07de05 in lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/ELF/Driver.cpp:697:5
    #11 0x55555a07aee2 in lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/ELF/Driver.cpp:175:19
    #12 0x555559ef23e8 in lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/Common/DriverDispatcher.cpp:164:12
    #13 0x555559ef2e7e in operator() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/Common/DriverDispatcher.cpp:189:15
    #14 0x555559ef2e7e in void llvm::function_ref<void ()>::callback_fn<lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>)::$_0>(long) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
    #15 0x555559e26e0d in operator() /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12
    #16 0x555559e26e0d in llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:426:3
    #17 0x555559ef2688 in lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/Common/DriverDispatcher.cpp:188:14
    #18 0x555559dfdddd in lld_main(int, char**, llvm::ToolContext const&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/tools/lld/lld.cpp:103:14
    #19 0x555559dfedf8 in main /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/tools/lld/lld-driver.cpp:17:10
    #20 0x7ffff7a2a1c9  (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6)
    #21 0x7ffff7a2a28a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6)
    #22 0x555559d65864 in _start (/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/lld+0x4811864)

SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:883:12 in llvm::operator==(llvm::StringRef, llvm::StringRef)

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 8, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-bootstrap-asan running on sanitizer-buildbot2 while building lld,llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/52/builds/2121

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 85621 of 85622 tests, 88 workers --
Testing:  0.. 10
FAIL: Clang :: Interpreter/inline-virtual.cpp (12444 of 85621)
******************** TEST 'Clang :: Interpreter/inline-virtual.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 6: cat /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation      | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation
+ cat /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp
RUN: at line 8: cat /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation      -Xcc -O2 | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp
+ cat /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation -Xcc -O2
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp
JIT session error: In graph incr_module_24-jitted-objectbuffer, section .text.startup: relocation target "_ZTV1A" at address 0x7b557ae0f000 is out of range of Delta32 fixup at 0x775578f0f013 (<anonymous block> @ 0x775578f0f010 + 0x3)
error: Failed to materialize symbols: { (main, { a2, $.incr_module_24.__inits.0, __orc_init_func.incr_module_24 }) }
error: Failed to materialize symbols: { (main, { __orc_init_func.incr_module_24 }) }
/home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp:26:11: error: CHECK: expected string not found in input
// CHECK: ~A(2)
          ^
<stdin>:1:262: note: scanning from here
clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl... clang-repl> clang-repl... clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> ~A(1)
                                                                                                                                                                                                                                                                     ^

Input file: <stdin>
Check file: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
          1: clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl... clang-repl> clang-repl... clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> ~A(1) 
check:26                                                                                                                                                                                                                                                                          X error: no match found
          2: clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl>  
check:26     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>>

--

Step 10 (stage2/asan check) failure: stage2/asan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 85621 of 85622 tests, 88 workers --
Testing:  0.. 10
FAIL: Clang :: Interpreter/inline-virtual.cpp (12444 of 85621)
******************** TEST 'Clang :: Interpreter/inline-virtual.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 6: cat /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation      | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation
+ cat /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp
RUN: at line 8: cat /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation      -Xcc -O2 | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp
+ cat /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation -Xcc -O2
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp
JIT session error: In graph incr_module_24-jitted-objectbuffer, section .text.startup: relocation target "_ZTV1A" at address 0x7b557ae0f000 is out of range of Delta32 fixup at 0x775578f0f013 (<anonymous block> @ 0x775578f0f010 + 0x3)
error: Failed to materialize symbols: { (main, { a2, $.incr_module_24.__inits.0, __orc_init_func.incr_module_24 }) }
error: Failed to materialize symbols: { (main, { __orc_init_func.incr_module_24 }) }
/home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp:26:11: error: CHECK: expected string not found in input
// CHECK: ~A(2)
          ^
<stdin>:1:262: note: scanning from here
clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl... clang-repl> clang-repl... clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> ~A(1)
                                                                                                                                                                                                                                                                     ^

Input file: <stdin>
Check file: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
          1: clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl... clang-repl> clang-repl... clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> ~A(1) 
check:26                                                                                                                                                                                                                                                                          X error: no match found
          2: clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl>  
check:26     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>>

--


@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 8, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-bootstrap-msan running on sanitizer-buildbot5 while building lld,llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/164/builds/2685

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 85619 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/lto/asmundef.ll (84318 of 85619)
******************** TEST 'lld :: ELF/lto/asmundef.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-as /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-as /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
RUN: at line 3: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-as /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-as /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
RUN: at line 4: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld.lld /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld.lld /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
Uninitialized bytes in MemcmpInterceptorCommon at offset 0 inside [0x70900000073e, 8)
==217771==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x5d48ab0a7d3c in bcmp /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/../sanitizer_common/sanitizer_common_interceptors.inc:859:10
    #1 0x5d48b0ff4c9b in operator== /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:883:12
    #2 0x5d48b0ff4c9b in isEqual /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:932:18
    #3 0x5d48b0ff4c9b in bool llvm::DenseMapBase<llvm::DenseMap<llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>, llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>::LookupBucketFor<llvm::StringRef>(llvm::StringRef const&, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>*&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:704:11
    #4 0x5d48b0fd2701 in operator[] /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:368:9
    #5 0x5d48b0fd2701 in llvm::lto::LTO::addModuleToGlobalRes(llvm::ArrayRef<llvm::lto::InputFile::Symbol>, llvm::ArrayRef<llvm::lto::SymbolResolution>, unsigned int, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/LTO/LTO.cpp:624:23
    #6 0x5d48b0fd4c1a in llvm::lto::LTO::addModule(llvm::lto::InputFile&, unsigned int, llvm::lto::SymbolResolution const*&, llvm::lto::SymbolResolution const*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/LTO/LTO.cpp:763:3
    #7 0x5d48b0fd3f44 in llvm::lto::LTO::add(std::__1::unique_ptr<llvm::lto::InputFile, std::__1::default_delete<llvm::lto::InputFile>>, llvm::ArrayRef<llvm::lto::SymbolResolution>) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/LTO/LTO.cpp:725:21
    #8 0x5d48ab837d2e in lld::elf::BitcodeCompiler::add(lld::elf::BitcodeFile&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/ELF/LTO.cpp:277:22
    #9 0x5d48ab629cf5 in void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::endianness)1, true>>(bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/ELF/Driver.cpp:2521:10
    #10 0x5d48ab5d314b in void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::endianness)1, true>>(llvm::opt::InputArgList&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/ELF/Driver.cpp:2995:3
    #11 0x5d48ab598119 in lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/ELF/Driver.cpp:697:5
    #12 0x5d48ab593bcd in lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/ELF/Driver.cpp:175:19
    #13 0x5d48ab2d9947 in lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/Common/DriverDispatcher.cpp:164:12
    #14 0x5d48ab2dac91 in operator() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/Common/DriverDispatcher.cpp:189:15
    #15 0x5d48ab2dac91 in void llvm::function_ref<void ()>::callback_fn<lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>)::$_0>(long) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
    #16 0x5d48ab142d50 in operator() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12
    #17 0x5d48ab142d50 in llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:426:3
    #18 0x5d48ab2da39e in lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/Common/DriverDispatcher.cpp:188:14
    #19 0x5d48ab1019fa in lld_main(int, char**, llvm::ToolContext const&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/tools/lld/lld.cpp:103:14
    #20 0x5d48ab102753 in main /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/tools/lld/lld-driver.cpp:17:10
    #21 0x7c147282a1c9  (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6)
    #22 0x7c147282a28a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6)
    #23 0x5d48ab066b64 in _start (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld+0x42aab64)

Step 10 (stage2/msan check) failure: stage2/msan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 85619 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/lto/asmundef.ll (84318 of 85619)
******************** TEST 'lld :: ELF/lto/asmundef.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-as /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-as /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
RUN: at line 3: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-as /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-as /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
RUN: at line 4: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld.lld /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld.lld /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
Uninitialized bytes in MemcmpInterceptorCommon at offset 0 inside [0x70900000073e, 8)
==217771==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x5d48ab0a7d3c in bcmp /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/../sanitizer_common/sanitizer_common_interceptors.inc:859:10
    #1 0x5d48b0ff4c9b in operator== /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:883:12
    #2 0x5d48b0ff4c9b in isEqual /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:932:18
    #3 0x5d48b0ff4c9b in bool llvm::DenseMapBase<llvm::DenseMap<llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>, llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>::LookupBucketFor<llvm::StringRef>(llvm::StringRef const&, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>*&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:704:11
    #4 0x5d48b0fd2701 in operator[] /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:368:9
    #5 0x5d48b0fd2701 in llvm::lto::LTO::addModuleToGlobalRes(llvm::ArrayRef<llvm::lto::InputFile::Symbol>, llvm::ArrayRef<llvm::lto::SymbolResolution>, unsigned int, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/LTO/LTO.cpp:624:23
    #6 0x5d48b0fd4c1a in llvm::lto::LTO::addModule(llvm::lto::InputFile&, unsigned int, llvm::lto::SymbolResolution const*&, llvm::lto::SymbolResolution const*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/LTO/LTO.cpp:763:3
    #7 0x5d48b0fd3f44 in llvm::lto::LTO::add(std::__1::unique_ptr<llvm::lto::InputFile, std::__1::default_delete<llvm::lto::InputFile>>, llvm::ArrayRef<llvm::lto::SymbolResolution>) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/LTO/LTO.cpp:725:21
    #8 0x5d48ab837d2e in lld::elf::BitcodeCompiler::add(lld::elf::BitcodeFile&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/ELF/LTO.cpp:277:22
    #9 0x5d48ab629cf5 in void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::endianness)1, true>>(bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/ELF/Driver.cpp:2521:10
    #10 0x5d48ab5d314b in void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::endianness)1, true>>(llvm::opt::InputArgList&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/ELF/Driver.cpp:2995:3
    #11 0x5d48ab598119 in lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/ELF/Driver.cpp:697:5
    #12 0x5d48ab593bcd in lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/ELF/Driver.cpp:175:19
    #13 0x5d48ab2d9947 in lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/Common/DriverDispatcher.cpp:164:12
    #14 0x5d48ab2dac91 in operator() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/Common/DriverDispatcher.cpp:189:15
    #15 0x5d48ab2dac91 in void llvm::function_ref<void ()>::callback_fn<lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>)::$_0>(long) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
    #16 0x5d48ab142d50 in operator() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12
    #17 0x5d48ab142d50 in llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:426:3
    #18 0x5d48ab2da39e in lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/Common/DriverDispatcher.cpp:188:14
    #19 0x5d48ab1019fa in lld_main(int, char**, llvm::ToolContext const&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/tools/lld/lld.cpp:103:14
    #20 0x5d48ab102753 in main /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/tools/lld/lld-driver.cpp:17:10
    #21 0x7c147282a1c9  (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6)
    #22 0x7c147282a28a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6)
    #23 0x5d48ab066b64 in _start (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld+0x42aab64)

Step 14 (stage2/msan_track_origins check) failure: stage2/msan_track_origins check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 85619 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/lto/asmundef.ll (84256 of 85619)
******************** TEST 'lld :: ELF/lto/asmundef.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/llvm-as /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/llvm-as /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
RUN: at line 3: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/llvm-as /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/llvm-as /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
RUN: at line 4: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/ld.lld /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/ld.lld /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
Uninitialized bytes in MemcmpInterceptorCommon at offset 0 inside [0x70900000034e, 8)
==2292553==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x555559c166bc in bcmp /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/../sanitizer_common/sanitizer_common_interceptors.inc:859:10
    #1 0x555562a21544 in operator== /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:883:12
    #2 0x555562a21544 in isEqual /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:932:18
    #3 0x555562a21544 in bool llvm::DenseMapBase<llvm::DenseMap<llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>, llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>::LookupBucketFor<llvm::StringRef>(llvm::StringRef const&, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>*&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:704:11
    #4 0x5555629ec56f in operator[] /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:368:9
    #5 0x5555629ec56f in llvm::lto::LTO::addModuleToGlobalRes(llvm::ArrayRef<llvm::lto::InputFile::Symbol>, llvm::ArrayRef<llvm::lto::SymbolResolution>, unsigned int, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/LTO/LTO.cpp:624:23
    #6 0x5555629efe55 in llvm::lto::LTO::addModule(llvm::lto::InputFile&, unsigned int, llvm::lto::SymbolResolution const*&, llvm::lto::SymbolResolution const*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/LTO/LTO.cpp:763:3
    #7 0x5555629ee857 in llvm::lto::LTO::add(std::__1::unique_ptr<llvm::lto::InputFile, std::__1::default_delete<llvm::lto::InputFile>>, llvm::ArrayRef<llvm::lto::SymbolResolution>) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/LTO/LTO.cpp:725:21
    #8 0x55555a758510 in lld::elf::BitcodeCompiler::add(lld::elf::BitcodeFile&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/ELF/LTO.cpp:277:22
    #9 0x55555a44b0fd in void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::endianness)1, true>>(bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/ELF/Driver.cpp:2521:10
    #10 0x55555a3c9b18 in void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::endianness)1, true>>(llvm::opt::InputArgList&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/ELF/Driver.cpp:2995:3
    #11 0x55555a373902 in lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/ELF/Driver.cpp:697:5
    #12 0x55555a36de38 in lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/ELF/Driver.cpp:175:19
    #13 0x555559f3d5e9 in lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/Common/DriverDispatcher.cpp:164:12
    #14 0x555559f3ede1 in operator() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/Common/DriverDispatcher.cpp:189:15
    #15 0x555559f3ede1 in void llvm::function_ref<void ()>::callback_fn<lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>)::$_0>(long) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
    #16 0x555559cd3c59 in operator() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12
    #17 0x555559cd3c59 in llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:426:3
    #18 0x555559f3e15c in lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/Common/DriverDispatcher.cpp:188:14
    #19 0x555559c70626 in lld_main(int, char**, llvm::ToolContext const&) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/tools/lld/lld.cpp:103:14
    #20 0x555559c717cf in main /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/tools/lld/tools/lld/lld-driver.cpp:17:10
    #21 0x7ffff782a1c9  (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6)
    #22 0x7ffff782a28a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6)
    #23 0x555559bd54e4 in _start (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan_track_origins/bin/lld+0x46814e4)


@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 8, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-hwasan running on sanitizer-buildbot11 while building lld,llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/1867

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 82135 tests, 48 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/lto/asmundef.ll (80795 of 82135)
******************** TEST 'lld :: ELF/lto/asmundef.ll' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
RUN: at line 3: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
RUN: at line 4: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
HWAddressSanitizer:DEADLYSIGNAL
==2794001==ERROR: HWAddressSanitizer: SEGV on unknown address 0x03e7002aa211 (pc 0xaeeda32d2ee8 bp 0xff649177fff0 sp 0xff649177ed00 T2794001)
==2794001==The signal is caused by a READ memory access.
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/llvm-symbolizer: error: 'linux-vdso.so.1': No such file or directory
    #0 0xaeeda32d2ee8 in HwasanOnSIGTRAP /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/compiler-rt/lib/hwasan/hwasan_linux.cpp:457:19
    #1 0xaeeda32d2ee8 in __hwasan::HwasanOnDeadlySignal(int, void*, void*) /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/compiler-rt/lib/hwasan/hwasan_linux.cpp:495:9
    #2 0xff64921418f4  (linux-vdso.so.1+0x8f4) (BuildId: 79f3b23b1a4079def7859a901b858cdd39b21f19)
    #3 0xff6491887624  (/lib/aarch64-linux-gnu/libc.so.6+0x87624) (BuildId: 32fa4d6f3a8d5f430bdb7af2eb779470cd5ec7c2)
    #4 0xff649183cb38 in raise (/lib/aarch64-linux-gnu/libc.so.6+0x3cb38) (BuildId: 32fa4d6f3a8d5f430bdb7af2eb779470cd5ec7c2)
    #5 0xaeeda334f20c in llvm::CrashRecoveryContext::throwIfCrash(int) /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:474:3
    #6 0xaeeda34f6490 in lld::exitLld(int) /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/Common/ErrorHandler.cpp:100:3
    #7 0xaeeda330868c in lld_main(int, char**, llvm::ToolContext const&) /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/tools/lld/lld.cpp:105:7
    #8 0xaeeda330981c in main /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/tools/lld/lld-driver.cpp:17:10
    #9 0xff64918284c0  (/lib/aarch64-linux-gnu/libc.so.6+0x284c0) (BuildId: 32fa4d6f3a8d5f430bdb7af2eb779470cd5ec7c2)
    #10 0xff6491828594 in __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x28594) (BuildId: 32fa4d6f3a8d5f430bdb7af2eb779470cd5ec7c2)
    #11 0xaeeda32c04ec in _start (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld+0x53004ec)

==2794001==Register values:
 x0 = 0x0000000000000005   x1 = 0x0000ff649177eda0   x2 = 0x0000ff649177ee20   x3 = 0x0000ff649212e020  
 x4 = 0x0000ff6492143b50   x5 = 0x0000000000000000   x6 = 0x0000000000000000   x7 = 0x0000000000000000  
 x8 = 0x000003e7002aa211   x9 = 0x0000000000000083  x10 = 0x0000000000000000  x11 = 0x0000000000000000  
x12 = 0x0000ff6492145350  x13 = 0x0000000000000039  x14 = 0x00000000004113a0  x15 = 0x000000000000009c  
x16 = 0x0000ff649183cb20  x17 = 0x0000aeedadb7f508  x18 = 0x0000000000000010  x19 = 0x0000ff649177ee20  
x20 = 0x0000ff649177eda0  x21 = 0x0000000000000005  x22 = 0x8a00ffffefaa0530  x23 = 0x0000000000000085  
x24 = 0x2400aeedae5901d0  x25 = 0x0000ffffefaa0530  x26 = 0x0000000000000001  x27 = 0x0000000000000000  
x28 = 0x00000aeedadb4f53   fp = 0x0000ff649177fff0   lr = 0x0000ff64921418f8   sp = 0x0000ff649177ed00  
HWAddressSanitizer can not provide additional info.
Step 10 (stage2/hwasan check) failure: stage2/hwasan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 82135 tests, 48 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/lto/asmundef.ll (80795 of 82135)
******************** TEST 'lld :: ELF/lto/asmundef.ll' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
RUN: at line 3: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
RUN: at line 4: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
HWAddressSanitizer:DEADLYSIGNAL
==2794001==ERROR: HWAddressSanitizer: SEGV on unknown address 0x03e7002aa211 (pc 0xaeeda32d2ee8 bp 0xff649177fff0 sp 0xff649177ed00 T2794001)
==2794001==The signal is caused by a READ memory access.
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/llvm-symbolizer: error: 'linux-vdso.so.1': No such file or directory
    #0 0xaeeda32d2ee8 in HwasanOnSIGTRAP /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/compiler-rt/lib/hwasan/hwasan_linux.cpp:457:19
    #1 0xaeeda32d2ee8 in __hwasan::HwasanOnDeadlySignal(int, void*, void*) /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/compiler-rt/lib/hwasan/hwasan_linux.cpp:495:9
    #2 0xff64921418f4  (linux-vdso.so.1+0x8f4) (BuildId: 79f3b23b1a4079def7859a901b858cdd39b21f19)
    #3 0xff6491887624  (/lib/aarch64-linux-gnu/libc.so.6+0x87624) (BuildId: 32fa4d6f3a8d5f430bdb7af2eb779470cd5ec7c2)
    #4 0xff649183cb38 in raise (/lib/aarch64-linux-gnu/libc.so.6+0x3cb38) (BuildId: 32fa4d6f3a8d5f430bdb7af2eb779470cd5ec7c2)
    #5 0xaeeda334f20c in llvm::CrashRecoveryContext::throwIfCrash(int) /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:474:3
    #6 0xaeeda34f6490 in lld::exitLld(int) /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/Common/ErrorHandler.cpp:100:3
    #7 0xaeeda330868c in lld_main(int, char**, llvm::ToolContext const&) /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/tools/lld/lld.cpp:105:7
    #8 0xaeeda330981c in main /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/tools/lld/lld-driver.cpp:17:10
    #9 0xff64918284c0  (/lib/aarch64-linux-gnu/libc.so.6+0x284c0) (BuildId: 32fa4d6f3a8d5f430bdb7af2eb779470cd5ec7c2)
    #10 0xff6491828594 in __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x28594) (BuildId: 32fa4d6f3a8d5f430bdb7af2eb779470cd5ec7c2)
    #11 0xaeeda32c04ec in _start (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld+0x53004ec)

==2794001==Register values:
 x0 = 0x0000000000000005   x1 = 0x0000ff649177eda0   x2 = 0x0000ff649177ee20   x3 = 0x0000ff649212e020  
 x4 = 0x0000ff6492143b50   x5 = 0x0000000000000000   x6 = 0x0000000000000000   x7 = 0x0000000000000000  
 x8 = 0x000003e7002aa211   x9 = 0x0000000000000083  x10 = 0x0000000000000000  x11 = 0x0000000000000000  
x12 = 0x0000ff6492145350  x13 = 0x0000000000000039  x14 = 0x00000000004113a0  x15 = 0x000000000000009c  
x16 = 0x0000ff649183cb20  x17 = 0x0000aeedadb7f508  x18 = 0x0000000000000010  x19 = 0x0000ff649177ee20  
x20 = 0x0000ff649177eda0  x21 = 0x0000000000000005  x22 = 0x8a00ffffefaa0530  x23 = 0x0000000000000085  
x24 = 0x2400aeedae5901d0  x25 = 0x0000ffffefaa0530  x26 = 0x0000000000000001  x27 = 0x0000000000000000  
x28 = 0x00000aeedadb4f53   fp = 0x0000ff649177fff0   lr = 0x0000ff64921418f8   sp = 0x0000ff649177ed00  
HWAddressSanitizer can not provide additional info.

@mingmingl-llvm
Copy link
Contributor Author

Reverted the change in 1cc4c87 and working on a fix (to store the saved StringRef in lto::InputFile::Symbol so it remains alive when lto global resolution happens, as opposed to merely save the StringRef of lto::InputFile::Symbol in unique string saver )

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 9, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-asan running on sanitizer-buildbot7 while building lld,llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/24/builds/1358

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 82135 of 82136 tests, 48 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/lto/asmundef.ll (80773 of 82135)
******************** TEST 'lld :: ELF/lto/asmundef.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
RUN: at line 3: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
RUN: at line 4: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
=================================================================
==3271689==ERROR: AddressSanitizer: heap-use-after-free on address 0xe89152a2483f at pc 0xb5003e625644 bp 0xffffe05aaa20 sp 0xffffe05aa208
READ of size 8 at 0xe89152a2483f thread T0
    #0 0xb5003e625640 in MemcmpInterceptorCommon(void*, int (*)(void const*, void const*, unsigned long), void const*, void const*, unsigned long) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:814:7
    #1 0xb5003e6259dc in bcmp /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:859:10
    #2 0xb5004338ab70 in operator== /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:883:12
    #3 0xb5004338ab70 in isEqual /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:932:18
    #4 0xb5004338ab70 in bool llvm::DenseMapBase<llvm::DenseMap<llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>, llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>::LookupBucketFor<llvm::StringRef>(llvm::StringRef const&, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>*&) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:704:11
    #5 0xb5004336fe60 in operator[] /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:368:9
    #6 0xb5004336fe60 in llvm::lto::LTO::addModuleToGlobalRes(llvm::ArrayRef<llvm::lto::InputFile::Symbol>, llvm::ArrayRef<llvm::lto::SymbolResolution>, unsigned int, bool) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/LTO/LTO.cpp:624:23
    #7 0xb50043371818 in llvm::lto::LTO::addModule(llvm::lto::InputFile&, unsigned int, llvm::lto::SymbolResolution const*&, llvm::lto::SymbolResolution const*) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/LTO/LTO.cpp:763:3
    #8 0xb5004337104c in llvm::lto::LTO::add(std::__1::unique_ptr<llvm::lto::InputFile, std::__1::default_delete<llvm::lto::InputFile>>, llvm::ArrayRef<llvm::lto::SymbolResolution>) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/LTO/LTO.cpp:725:21
    #9 0xb5003ecce938 in lld::elf::BitcodeCompiler::add(lld::elf::BitcodeFile&) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/ELF/LTO.cpp:277:22
    #10 0xb5003eb0a2f4 in void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::endianness)1, true>>(bool) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/ELF/Driver.cpp:2521:10
    #11 0xb5003eac3ac0 in void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::endianness)1, true>>(llvm::opt::InputArgList&) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/ELF/Driver.cpp:2995:3
    #12 0xb5003ea9c444 in lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/ELF/Driver.cpp:697:5
    #13 0xb5003ea9907c in lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/ELF/Driver.cpp:175:19
    #14 0xb5003e86dbac in lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/Common/DriverDispatcher.cpp:164:12
    #15 0xb5003e86e95c in operator() /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/Common/DriverDispatcher.cpp:189:15
    #16 0xb5003e86e95c in void llvm::function_ref<void ()>::callback_fn<lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>)::$_0>(long) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
    #17 0xb5003e725fc4 in operator() /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12
    #18 0xb5003e725fc4 in llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:426:3
    #19 0xb5003e86e350 in lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/Common/DriverDispatcher.cpp:188:14
    #20 0xb5003e6e9a98 in lld_main(int, char**, llvm::ToolContext const&) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/tools/lld/lld.cpp:103:14
    #21 0xb5003e6eaca4 in main /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/tools/lld/lld-driver.cpp:17:10
    #22 0xebc1560684c0  (/lib/aarch64-linux-gnu/libc.so.6+0x284c0) (BuildId: 32fa4d6f3a8d5f430bdb7af2eb779470cd5ec7c2)
    #23 0xebc156068594 in __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x28594) (BuildId: 32fa4d6f3a8d5f430bdb7af2eb779470cd5ec7c2)
Step 10 (stage2/asan check) failure: stage2/asan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 82135 of 82136 tests, 48 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/lto/asmundef.ll (80773 of 82135)
******************** TEST 'lld :: ELF/lto/asmundef.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/lto/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o
RUN: at line 3: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-as /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/lto/Inputs/asmundef.ll -o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o
RUN: at line 4: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp.o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp2.o -o /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/lto/Output/asmundef.ll.tmp -save-temps
=================================================================
==3271689==ERROR: AddressSanitizer: heap-use-after-free on address 0xe89152a2483f at pc 0xb5003e625644 bp 0xffffe05aaa20 sp 0xffffe05aa208
READ of size 8 at 0xe89152a2483f thread T0
    #0 0xb5003e625640 in MemcmpInterceptorCommon(void*, int (*)(void const*, void const*, unsigned long), void const*, void const*, unsigned long) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:814:7
    #1 0xb5003e6259dc in bcmp /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:859:10
    #2 0xb5004338ab70 in operator== /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:883:12
    #3 0xb5004338ab70 in isEqual /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/StringRef.h:932:18
    #4 0xb5004338ab70 in bool llvm::DenseMapBase<llvm::DenseMap<llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>, llvm::StringRef, llvm::lto::LTO::GlobalResolution, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>>::LookupBucketFor<llvm::StringRef>(llvm::StringRef const&, llvm::detail::DenseMapPair<llvm::StringRef, llvm::lto::LTO::GlobalResolution>*&) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:704:11
    #5 0xb5004336fe60 in operator[] /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:368:9
    #6 0xb5004336fe60 in llvm::lto::LTO::addModuleToGlobalRes(llvm::ArrayRef<llvm::lto::InputFile::Symbol>, llvm::ArrayRef<llvm::lto::SymbolResolution>, unsigned int, bool) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/LTO/LTO.cpp:624:23
    #7 0xb50043371818 in llvm::lto::LTO::addModule(llvm::lto::InputFile&, unsigned int, llvm::lto::SymbolResolution const*&, llvm::lto::SymbolResolution const*) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/LTO/LTO.cpp:763:3
    #8 0xb5004337104c in llvm::lto::LTO::add(std::__1::unique_ptr<llvm::lto::InputFile, std::__1::default_delete<llvm::lto::InputFile>>, llvm::ArrayRef<llvm::lto::SymbolResolution>) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/LTO/LTO.cpp:725:21
    #9 0xb5003ecce938 in lld::elf::BitcodeCompiler::add(lld::elf::BitcodeFile&) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/ELF/LTO.cpp:277:22
    #10 0xb5003eb0a2f4 in void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::endianness)1, true>>(bool) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/ELF/Driver.cpp:2521:10
    #11 0xb5003eac3ac0 in void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::endianness)1, true>>(llvm::opt::InputArgList&) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/ELF/Driver.cpp:2995:3
    #12 0xb5003ea9c444 in lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/ELF/Driver.cpp:697:5
    #13 0xb5003ea9907c in lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/ELF/Driver.cpp:175:19
    #14 0xb5003e86dbac in lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/Common/DriverDispatcher.cpp:164:12
    #15 0xb5003e86e95c in operator() /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/Common/DriverDispatcher.cpp:189:15
    #16 0xb5003e86e95c in void llvm::function_ref<void ()>::callback_fn<lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>)::$_0>(long) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
    #17 0xb5003e725fc4 in operator() /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12
    #18 0xb5003e725fc4 in llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:426:3
    #19 0xb5003e86e350 in lld::lldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/Common/DriverDispatcher.cpp:188:14
    #20 0xb5003e6e9a98 in lld_main(int, char**, llvm::ToolContext const&) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/tools/lld/lld.cpp:103:14
    #21 0xb5003e6eaca4 in main /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/tools/lld/lld-driver.cpp:17:10
    #22 0xebc1560684c0  (/lib/aarch64-linux-gnu/libc.so.6+0x284c0) (BuildId: 32fa4d6f3a8d5f430bdb7af2eb779470cd5ec7c2)
    #23 0xebc156068594 in __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x28594) (BuildId: 32fa4d6f3a8d5f430bdb7af2eb779470cd5ec7c2)

mingmingl-llvm added a commit that referenced this pull request Sep 9, 2024
…bal resolution in ELF" (#107792)

Fix the use-after-free bug and re-apply
#106193
* Without the fix, the string referenced by `objSym.Name` could be
destroyed even if string saver keeps a copy of the referenced string.
This caused use-after-free.
* The fix ([latest
commit](9776ed4))
updates `objSym.Name` to reference (via `StringRef`) the string saver's
copy.

Test:
1. For `lld/test/ELF/lto/asmundef.ll`, its test failure is reproducible
with `-DLLVM_USE_SANITIZER=Address` and gone with the fix.
3. Run all tests by following
https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild#try-local-changes.
* Without the fix, `ELF/lto/asmundef.ll` aborted the multi-stage test at
`@@@BUILD_STEP stage2/asan_ubsan check@@@`, defined
[here](https://github.com/llvm/llvm-zorg/blob/main/zorg/buildbot/builders/sanitizers/buildbot_fast.sh#L30)
* With the fix, the [multi-stage
test](https://github.com/llvm/llvm-zorg/blob/main/zorg/buildbot/builders/sanitizers/buildbot_fast.sh)
pass stage2 {asan, ubsan, masan}. This is also the test used by
https://lab.llvm.org/buildbot/#/builders/169


**Original commit message**

`StringMap<T>` creates a [copy of the
string](https://github.com/llvm/llvm-project/blob/d4c519e7b2ac21350ec08b23eda44bf4a2d3c974/llvm/include/llvm/ADT/StringMapEntry.h#L55-L58)
for entry insertions and intentionally keep copies [since the
implementation optimizes string memory
usage](https://github.com/llvm/llvm-project/blob/d4c519e7b2ac21350ec08b23eda44bf4a2d3c974/llvm/include/llvm/ADT/StringMap.h#L124).
On the other hand, linker keeps copies of symbol names [1] in
`lld::elf::parseFiles` [2] before invoking `compileBitcodeFiles` [3].

This change proposes to optimize away string copies inside
[LTO::GlobalResolutions](https://github.com/llvm/llvm-project/blob/24e791b4164986a1ca7776e3ae0292ef20d20c47/llvm/include/llvm/LTO/LTO.h#L409),
which will make LTO indexing more memory efficient for ELF. There are
similar opportunities for other (COFF, wasm, MachO) formats.

The optimization takes place for lld (ELF) only. For the rest of use
cases (gold plugin, `llvm-lto2`, etc), LTO owns a string saver to keep
copies and use global resolution key for de-duplication.

Together with @kazutakahirata's work to make `ComputeCrossModuleImport`
more memory efficient, we see a ~20% peak memory usage reduction in a
binary where peak memory usage needs to go down. Thanks to the
optimization in
329ba52,
the max (as opposed to the sum) of `ComputeCrossModuleImport` or
`GlobalResolution` shows up in peak memory usage.
* Regarding correctness, the set of
[resolved](https://github.com/llvm/llvm-project/blob/80c47ad3aec9d7f22e1b1bdc88960a91b66f89f1/llvm/lib/LTO/LTO.cpp#L739)
[per-module
symbols](https://github.com/llvm/llvm-project/blob/80c47ad3aec9d7f22e1b1bdc88960a91b66f89f1/llvm/include/llvm/LTO/LTO.h#L188-L191)
is a subset of
[llvm::lto::InputFile::Symbols](https://github.com/llvm/llvm-project/blob/80c47ad3aec9d7f22e1b1bdc88960a91b66f89f1/llvm/include/llvm/LTO/LTO.h#L120).
And bitcode symbol parsing saves symbol name when iterating
`obj->symbols` in `BitcodeFile::parse` already. This change updates
`BitcodeFile::parseLazy` to keep copies of per-module undefined symbols.
* Presumably the undefined symbols in a LTO unit (copied in this patch
in linker unique saver) is a small set compared with the set of symbols
in global-resolution (copied before this patch), making this a
worthwhile trade-off. Benchmarking this change alone shows measurable
memory savings across various benchmarks.

[1] ELF
https://github.com/llvm/llvm-project/blob/1cea5c2138bef3d8fec75508df6dbb858e6e3560/lld/ELF/InputFiles.cpp#L1748
[2]
https://github.com/llvm/llvm-project/blob/ef7b18a53c0d186dcda1e322be6035407fdedb55/lld/ELF/Driver.cpp#L2863
[3]
https://github.com/llvm/llvm-project/blob/ef7b18a53c0d186dcda1e322be6035407fdedb55/lld/ELF/Driver.cpp#L2995
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lld:ELF lld llvm:support LTO Link time optimization (regular/full LTO or ThinLTO)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants