[Lldb-commits] [PATCH] D59495: Fix an out-of-bounds error in RegisterContextDarwin_arm64

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 27 02:39:15 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL357055: Fix an out-of-bounds error in RegisterContextDarwin_arm64 (authored by labath, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D59495?vs=191101&id=192419#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D59495

Files:
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp


Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
@@ -429,7 +429,7 @@
   case fpu_v29:
   case fpu_v30:
   case fpu_v31:
-    value.SetBytes(fpu.v[reg].bytes.buffer, reg_info->byte_size,
+    value.SetBytes(fpu.v[reg - fpu_v0].bytes.buffer, reg_info->byte_size,
                    endian::InlHostByteOrder());
     break;
 
@@ -621,7 +621,8 @@
   case fpu_v29:
   case fpu_v30:
   case fpu_v31:
-    ::memcpy(fpu.v[reg].bytes.buffer, value.GetBytes(), value.GetByteSize());
+    ::memcpy(fpu.v[reg - fpu_v0].bytes.buffer, value.GetBytes(),
+             value.GetByteSize());
     break;
 
   case fpu_fpsr:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59495.192419.patch
Type: text/x-patch
Size: 864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190327/5c34d40d/attachment.bin>


More information about the lldb-commits mailing list