LLVM 20.0.0git
Functions | Variables
CrashRecoveryContext.cpp File Reference
#include "llvm/Support/CrashRecoveryContext.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ExitCodes.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/thread.h"
#include <cassert>
#include <mutex>
#include <setjmp.h>
#include <signal.h>

Go to the source code of this file.

Functions

static void installExceptionOrSignalHandlers ()
 
static void uninstallExceptionOrSignalHandlers ()
 
static void CrashRecoverySignalHandler (int Signal)
 
static void setThreadBackgroundPriority ()
 
static bool hasThreadBackgroundPriority ()
 
static void RunSafelyOnThread_Dispatch (void *UserData)
 

Variables

static const int Signals []
 
static const unsigned NumSignals = std::size(Signals)
 
static struct sigaction PrevActions [NumSignals]
 

Function Documentation

◆ CrashRecoverySignalHandler()

static void CrashRecoverySignalHandler ( int  Signal)
static

◆ hasThreadBackgroundPriority()

static bool hasThreadBackgroundPriority ( )
static

◆ installExceptionOrSignalHandlers()

static void installExceptionOrSignalHandlers ( )
static

◆ RunSafelyOnThread_Dispatch()

static void RunSafelyOnThread_Dispatch ( void *  UserData)
static

◆ setThreadBackgroundPriority()

static void setThreadBackgroundPriority ( )
static

Definition at line 480 of file CrashRecoveryContext.cpp.

Referenced by RunSafelyOnThread_Dispatch().

◆ uninstallExceptionOrSignalHandlers()

static void uninstallExceptionOrSignalHandlers ( )
static

Definition at line 405 of file CrashRecoveryContext.cpp.

References NumSignals, PrevActions, and Signals.

Referenced by llvm::CrashRecoveryContext::Disable().

Variable Documentation

◆ NumSignals

const unsigned NumSignals = std::size(Signals)
static

◆ PrevActions

struct sigaction PrevActions[NumSignals]
static

◆ Signals

const int Signals[]
static
Initial value:
=
{ SIGABRT, SIGBUS, SIGFPE, SIGILL, SIGSEGV, SIGTRAP }

Definition at line 347 of file CrashRecoveryContext.cpp.

Referenced by installExceptionOrSignalHandlers(), and uninstallExceptionOrSignalHandlers().