[all-commits] [llvm/llvm-project] da4e82: Don't read off end of GPR register array to access...

Jason Molenda via All-commits all-commits at lists.llvm.org
Wed Jan 4 13:51:41 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: da4e82753f3130ca2ff973ad90092ad1c035038a
      https://github.com/llvm/llvm-project/commit/da4e82753f3130ca2ff973ad90092ad1c035038a
  Author: Jason Molenda <jason at molenda.com>
  Date:   2023-01-04 (Wed, 04 Jan 2023)

  Changed paths:
    M lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp

  Log Message:
  -----------
  Don't read off end of GPR register array to access fp/sp/lr/pc

The arm64 register context on Darwin has the 29 general purpose
registers, then pc/sp/lr/fp with different field names depending
on compile-time flags.  Instead of accessing beyond the end of
the uint64_t[29] array, and upsetting the sanitizers, access those
registers correctly with the correct name.

Fixes a test failure on the ASAN CI bot, currently being
skipped, in TestEarlyProcessLaunch.py.

Differential Revision: https://reviews.llvm.org/D140067
rdar://103359354




More information about the All-commits mailing list