[llvm] Fix a use-after-move bug in DWARFVerifier constructor (PR #83621)

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 13:03:28 PST 2024


https://github.com/ykhatav created https://github.com/llvm/llvm-project/pull/83621

None

>From e48008bd8cd5f1034376fbe72f13928b11d36983 Mon Sep 17 00:00:00 2001
From: "Khatavkar, Yashasvi" <yashasvi.khatavkar at intel.com>
Date: Fri, 1 Mar 2024 11:49:36 -0800
Subject: [PATCH] Fix a use-after-move bug in DWARFVerifier constructor

---
 llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
index 520debe513d9f1..6433a65f648e76 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
@@ -1083,7 +1083,7 @@ DWARFVerifier::DWARFVerifier(raw_ostream &S, DWARFContext &D,
                              DIDumpOptions DumpOpts)
     : OS(S), DCtx(D), DumpOpts(std::move(DumpOpts)), IsObjectFile(false),
       IsMachOObject(false) {
-  ErrorCategory.ShowDetail(DumpOpts.Verbose || !DumpOpts.ShowAggregateErrors);
+  ErrorCategory.ShowDetail(this->DumpOpts.Verbose || !this->DumpOpts.ShowAggregateErrors);
   if (const auto *F = DCtx.getDWARFObj().getFile()) {
     IsObjectFile = F->isRelocatableObject();
     IsMachOObject = F->isMachO();



More information about the llvm-commits mailing list