Skip to content

Commit

Permalink
Revert "[DWP][DWARF] Detect and error on debug info offset overflow"
Browse files Browse the repository at this point in the history
This reverts commit 417738d.
  • Loading branch information
ayermolo committed Jul 22, 2022
1 parent 08091a9 commit 6690c64
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions llvm/lib/DWP/DWP.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 6690c64

Please sign in to comment.