[llvm] 6690c64 - Revert "[DWP][DWARF] Detect and error on debug info offset overflow"

Alexander Yermolovich via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 13:03:35 PDT 2022


Author: Alexander Yermolovich
Date: 2022-07-22T13:02:08-07:00
New Revision: 6690c64639370a1845f42736423dea92cd06defd

URL: https://github.com/llvm/llvm-project/commit/6690c64639370a1845f42736423dea92cd06defd
DIFF: https://github.com/llvm/llvm-project/commit/6690c64639370a1845f42736423dea92cd06defd.diff

LOG: Revert "[DWP][DWARF] Detect and error on debug info offset overflow"

This reverts commit 417738d3a66cc65f3fc58ab9535c17fac1ddaff1.

Added: 
    

Modified: 
    llvm/lib/DWP/DWP.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/DWP/DWP.cpp b/llvm/lib/DWP/DWP.cpp
index 4a2053b3a765..44e39c019e0c 100644
--- a/llvm/lib/DWP/DWP.cpp
+++ b/llvm/lib/DWP/DWP.cpp
@@ -18,7 +18,6 @@
 #include "llvm/Object/Decompressor.h"
 #include "llvm/Object/ELFObjectFile.h"
 #include "llvm/Support/MemoryBuffer.h"
-#include <limits>
 
 using namespace llvm;
 using namespace llvm::object;
@@ -680,9 +679,6 @@ Error write(MCStreamer &Out, ArrayRef<std::string> Inputs) {
               continue;
           }
           Out.emitBytes(Info.substr(UnitOffset - C.Length, C.Length));
-          if (std::numeric_limits<uint32_t>::max() - InfoSectionOffset < C.Length)
-            return make_error<DWPError>("Debug Info offset greater then 4GB.");
-
           InfoSectionOffset += C.Length;
         }
       }


        


More information about the llvm-commits mailing list