[libcxx-commits] [PATCH] D83741: [libunwind] Fix CIE v1 return address parsing

Ryan Prichard via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 15 19:14:12 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG52d0a78b8315: [libunwind] Fix CIE v1 return address parsing (authored by rprichard).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83741

Files:
  libunwind/src/DwarfParser.hpp


Index: libunwind/src/DwarfParser.hpp
===================================================================
--- libunwind/src/DwarfParser.hpp
+++ libunwind/src/DwarfParser.hpp
@@ -336,7 +336,8 @@
   // parse data alignment factor
   cieInfo->dataAlignFactor = (int)addressSpace.getSLEB128(p, cieContentEnd);
   // parse return address register
-  uint64_t raReg = addressSpace.getULEB128(p, cieContentEnd);
+  uint64_t raReg = (version == 1) ? addressSpace.get8(p++)
+                                  : addressSpace.getULEB128(p, cieContentEnd);
   assert(raReg < 255 && "return address register too large");
   cieInfo->returnAddressRegister = (uint8_t)raReg;
   // parse augmentation data based on augmentation string


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83741.278355.patch
Type: text/x-patch
Size: 718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200716/f47e9cfb/attachment.bin>


More information about the libcxx-commits mailing list