[all-commits] [llvm/llvm-project] a11b33: [lldb/Bindings] Check that process isn't None befo...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Tue Mar 17 17:06:16 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a11b330418819d9cc9c4f0ecd31acdc2e0bbb703
      https://github.com/llvm/llvm-project/commit/a11b330418819d9cc9c4f0ecd31acdc2e0bbb703
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M lldb/bindings/interface/SBAddress.i

  Log Message:
  -----------
  [lldb/Bindings] Check that process isn't None before calling is_alive.

Make sure that `process` is not None before calling is_alive. Otherwise
this might result in an AttributeError: 'NoneType' object has no
attribute 'is_alive'.

Although lldb.process and friends could already be None in the past, for
example after leaving an interactive scripting session, the issue became
more prevalent after `fc1fd6bf9fcfac412b10b4193805ec5de0e8df57`.

I audited the other interface files for usages of target, process,
thread and frame, but this seems the only place where a global is used
from an SB class.




More information about the All-commits mailing list