[all-commits] [llvm/llvm-project] 56535a: [lldb] Don't crash when attaching to pid and no bi...

Jason Molenda via All-commits all-commits at lists.llvm.org
Tue Jul 23 17:51:02 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 56535a090d91ff10a60c884bacbd314dcf9659db
      https://github.com/llvm/llvm-project/commit/56535a090d91ff10a60c884bacbd314dcf9659db
  Author: Jason Molenda <jmolenda at apple.com>
  Date:   2024-07-23 (Tue, 23 Jul 2024)

  Changed paths:
    M lldb/source/Commands/CommandObjectProcess.cpp

  Log Message:
  -----------
  [lldb] Don't crash when attaching to pid and no binaries found (#100287)

There is a narrow window during process launch on macOS where lldb can
attach and no binaries will be seen as loaded in the process (none
reported by libdyld SPI). A year ago I made changes to set the
new-binary-loaded breakpoint correctly despite this. But we've seen a
crash when this combination is seen, where
CommandObjectProcessAttach::DoExecute assumed there was at least one
binary registered in the Target. Fix that.

Also fix two FileSpec API uses from when we didn't have a GetPath()
method that returned a std::string, and was copying the filepaths into
fixed length buffers. All of this code was from ~14 years ago when we
didn't have that API.

rdar://131631627



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list