[llvm] Fix a use-after-move bug in DWARFVerifier constructor (PR #83621)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Mar  4 05:45:37 PST 2024
    
    
  
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-debuginfo
Author: ykhatav (ykhatav)
<details>
<summary>Changes</summary>
Resolve a use-after-move bug for the parameter "DumpOpts" in the DWARFVerifier constructor.
---
Full diff: https://github.com/llvm/llvm-project/pull/83621.diff
1 Files Affected:
- (modified) llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp (+2-1) 
``````````diff
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
index 520debe513d9f1..4ef6c80ed0289d 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
@@ -1083,7 +1083,8 @@ 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();
``````````
</details>
https://github.com/llvm/llvm-project/pull/83621
    
    
More information about the llvm-commits
mailing list