[all-commits] [llvm/llvm-project] 7e1a30: [LLDB] [PECOFF] Don't crash in ReadImageDataByRVA ...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Thu Oct 31 02:27:56 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7e1a3076419d4d453d71143a1e81409ea1db177c
      https://github.com/llvm/llvm-project/commit/7e1a3076419d4d453d71143a1e81409ea1db177c
  Author: Martin Storsjö <martin at martin.st>
  Date:   2019-10-31 (Thu, 31 Oct 2019)

  Changed paths:
    M lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
    A lldb/test/Shell/Minidump/Windows/Inputs/broken-unwind.dmp.yaml
    A lldb/test/Shell/Minidump/Windows/Inputs/broken-unwind.exe.yaml
    A lldb/test/Shell/Minidump/Windows/broken-unwind.test

  Log Message:
  -----------
  [LLDB] [PECOFF] Don't crash in ReadImageDataByRVA for addresses out of range

This can happen e.g. when unwinding doesn't work perfectly.

Differential Revision: https://reviews.llvm.org/D69502


  Commit: a42967f63c96b30dd6873ceb7b2932eb7cf2cd05
      https://github.com/llvm/llvm-project/commit/a42967f63c96b30dd6873ceb7b2932eb7cf2cd05
  Author: Martin Storsjö <martin at martin.st>
  Date:   2019-10-31 (Thu, 31 Oct 2019)

  Changed paths:
    M lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.cpp

  Log Message:
  -----------
  [LLDB] [Windows] Remove a TODO which probably won't be implemented

Contrary to WoW64 on x86_64, there's no struct similar to WOW64_CONTEXT
defined, for storing and handling the CPU state of an ARM32 process
from an ARM64 process. Thus, making an ARM64 lldb-server able to
control ARM32 processes seems infeasible at the moment.

(The normal CONTEXT struct has a different layout on each architecture.
In addition to this, a WOW64_CONTEXT struct always is defined, that
can store the CPU state of an x86_32 process, to allow handling it from
an x86_64 process. But there's no similar universally available struct
for ARM32.)


  Commit: 3db1d138b1172b5855f35ab74dbf3bf327f517d2
      https://github.com/llvm/llvm-project/commit/3db1d138b1172b5855f35ab74dbf3bf327f517d2
  Author: Martin Storsjö <martin at martin.st>
  Date:   2019-10-31 (Thu, 31 Oct 2019)

  Changed paths:
    M lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
    A lldb/test/Shell/ObjectFile/PECOFF/invalid-export-table.yaml

  Log Message:
  -----------
  [LLDB] [PECOFF] Fix error handling for executables that object::createBinary errors out on

llvm::object::createBinary returns an Expected<>, which requires
not only checking the object for success, but also requires consuming
the Error, if one was set.

Use LLDB_LOG_ERROR for this case, and change an existing similar log
statement to use it as well, to make sure the Error is consumed even
if the log channel is disabled.

Differential Revision: https://reviews.llvm.org/D69646


  Commit: 403cd574b6d9fbdae1b39fe9d2576b02c7139486
      https://github.com/llvm/llvm-project/commit/403cd574b6d9fbdae1b39fe9d2576b02c7139486
  Author: Martin Storsjö <martin at martin.st>
  Date:   2019-10-31 (Thu, 31 Oct 2019)

  Changed paths:
    M lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
    M lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.h
    M lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
    A lldb/test/Shell/Process/Windows/launch_failure.yaml

  Log Message:
  -----------
  [LLDB] [Windows] Fix Windows-specific race condition in LLDB for session lifetime

This can e.g. happen if the debugged executable exits before the initial
stop, e.g. if it fails to load dependent DLLs.

Add a virtual destructor to ProcessDebugger and let it clean up the
session, and make ProcessWindows::OnExitProcess call
ProcessDebugger::OnExitProcess for shared parts.

Fix suggestion by Adrian McCarthy.

Differential Revision: https://reviews.llvm.org/D69503


Compare: https://github.com/llvm/llvm-project/compare/e65ddcafee54...403cd574b6d9


More information about the All-commits mailing list