[all-commits] [llvm/llvm-project] 3df88e: [Support] Don't print stacktrace if DbgHelp.dll ha...

Andy Hippo via All-commits all-commits at lists.llvm.org
Tue Feb 8 08:38:15 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3df88ec335da7c3ed1625014d6f9b05fd5b54f31
      https://github.com/llvm/llvm-project/commit/3df88ec335da7c3ed1625014d6f9b05fd5b54f31
  Author: Andy Yankovsky <weratt at gmail.com>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M llvm/lib/Support/Windows/Signals.inc
    M llvm/unittests/Support/ProgramTest.cpp
    M llvm/utils/unittest/UnitTestMain/TestMain.cpp

  Log Message:
  -----------
  [Support] Don't print stacktrace if DbgHelp.dll hasn't been loaded yet

On Windows certain function from `Signals.h` require that `DbgHelp.dll` is loaded. This typically happens when the main program calls `llvm::InitLLVM`, however in some cases main program doesn't do that (e.g. when the application is using LLDB via `liblldb.dll`). This patch adds a safe guard to prevent crashes. More discussion in
https://reviews.llvm.org/D119009.

Reviewed By: aganea

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




More information about the All-commits mailing list