[PATCH] D138763: [dsymutil] fix accidental 32bit truncation in patchFrameInfoForObject

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 17 06:27:52 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG10539ec2cf69: [dsymutil] fix accidental 32bit truncation in patchFrameInfoForObject (authored by aarzilli, committed by avl).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138763/new/

https://reviews.llvm.org/D138763

Files:
  llvm/include/llvm/DWARFLinker/DWARFLinker.h
  llvm/include/llvm/DWARFLinker/DWARFStreamer.h
  llvm/lib/DWARFLinker/DWARFLinker.cpp
  llvm/lib/DWARFLinker/DWARFStreamer.cpp


Index: llvm/lib/DWARFLinker/DWARFStreamer.cpp
===================================================================
--- llvm/lib/DWARFLinker/DWARFStreamer.cpp
+++ llvm/lib/DWARFLinker/DWARFStreamer.cpp
@@ -796,7 +796,7 @@
 /// contains the FDE data without the length, CIE offset and address
 /// which will be replaced with the parameter values.
 void DwarfStreamer::emitFDE(uint32_t CIEOffset, uint32_t AddrSize,
-                            uint32_t Address, StringRef FDEBytes) {
+                            uint64_t Address, StringRef FDEBytes) {
   MS->switchSection(MC->getObjectFileInfo()->getDwarfFrameSection());
 
   MS->emitIntValue(FDEBytes.size() + 4 + AddrSize, 4);
Index: llvm/lib/DWARFLinker/DWARFLinker.cpp
===================================================================
--- llvm/lib/DWARFLinker/DWARFLinker.cpp
+++ llvm/lib/DWARFLinker/DWARFLinker.cpp
@@ -1895,7 +1895,7 @@
       continue;
     }
 
-    uint32_t Loc = Data.getUnsigned(&InputOffset, AddrSize);
+    uint64_t Loc = Data.getUnsigned(&InputOffset, AddrSize);
 
     // Some compilers seem to emit frame info that doesn't start at
     // the function entry point, thus we can't just lookup the address
Index: llvm/include/llvm/DWARFLinker/DWARFStreamer.h
===================================================================
--- llvm/include/llvm/DWARFLinker/DWARFStreamer.h
+++ llvm/include/llvm/DWARFLinker/DWARFStreamer.h
@@ -137,7 +137,7 @@
   void emitCIE(StringRef CIEBytes) override;
 
   /// Emit an FDE with data \p Bytes.
-  void emitFDE(uint32_t CIEOffset, uint32_t AddreSize, uint32_t Address,
+  void emitFDE(uint32_t CIEOffset, uint32_t AddreSize, uint64_t Address,
                StringRef Bytes) override;
 
   /// Emit DWARF debug names.
Index: llvm/include/llvm/DWARFLinker/DWARFLinker.h
===================================================================
--- llvm/include/llvm/DWARFLinker/DWARFLinker.h
+++ llvm/include/llvm/DWARFLinker/DWARFLinker.h
@@ -153,7 +153,7 @@
   virtual void emitCIE(StringRef CIEBytes) = 0;
 
   /// Emit an FDE with data \p Bytes.
-  virtual void emitFDE(uint32_t CIEOffset, uint32_t AddreSize, uint32_t Address,
+  virtual void emitFDE(uint32_t CIEOffset, uint32_t AddreSize, uint64_t Address,
                        StringRef Bytes) = 0;
 
   /// Emit the .debug_loc contribution for \p Unit by copying the entries from


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138763.483747.patch
Type: text/x-patch
Size: 2358 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221217/a7e96ee5/attachment.bin>


More information about the llvm-commits mailing list