[all-commits] [llvm/llvm-project] 9bc8df: [lldb][windows] print an error if Python fails to ...

Charles Zablit via All-commits all-commits at lists.llvm.org
Tue Sep 8 05:11:08 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9bc8df6b880ef04a90e5b9ff05afd07f6fbdf562
      https://github.com/llvm/llvm-project/commit/9bc8df6b880ef04a90e5b9ff05afd07f6fbdf562
  Author: Charles Zablit <c_zablit at apple.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
    M lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h

  Log Message:
  -----------
  [lldb][windows] print an error if Python fails to initialize (#181160)

Add checks around the `Py_init*` calls to check if Python was
initialized correctly. If any of the calls fails, print an error and
return early.

Python will fail to initialize if `%SystemRoot%` is not defined which
causes lldb to crash. This patch prints an error if the initialization
fails and returns early. lldb still crashes but gives a clue as to why
that's the case.

rdar://168004280



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