LLVM  14.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::AddressSanitizerPass Class Reference

Public interface to the address sanitizer pass for instrumenting code to check for various memory errors at runtime. More...

#include "llvm/Transforms/Instrumentation/AddressSanitizer.h"

Inheritance diagram for llvm::AddressSanitizerPass:
Inheritance graph
[legend]
Collaboration diagram for llvm::AddressSanitizerPass:
Collaboration graph
[legend]

Public Member Functions

 AddressSanitizerPass (AddressSanitizerOptions Options)
 
PreservedAnalyses run (Function &F, FunctionAnalysisManager &AM)
 
void printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
 
- Public Member Functions inherited from llvm::PassInfoMixin< AddressSanitizerPass >
void printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
 

Static Public Member Functions

static bool isRequired ()
 
- Static Public Member Functions inherited from llvm::PassInfoMixin< AddressSanitizerPass >
static StringRef name ()
 Gets the name of the pass we are mixed into. More...
 

Detailed Description

Public interface to the address sanitizer pass for instrumenting code to check for various memory errors at runtime.

The sanitizer itself is a function pass that works by inserting various calls to the ASan runtime library functions. The runtime library essentially replaces malloc() and free() with custom implementations that allow regions surrounding requested memory to be checked for invalid accesses.

Definition at line 113 of file AddressSanitizer.h.

Constructor & Destructor Documentation

◆ AddressSanitizerPass()

llvm::AddressSanitizerPass::AddressSanitizerPass ( AddressSanitizerOptions  Options)
inlineexplicit

Definition at line 115 of file AddressSanitizer.h.

References Options.

Member Function Documentation

◆ isRequired()

static bool llvm::AddressSanitizerPass::isRequired ( )
inlinestatic

Definition at line 120 of file AddressSanitizer.h.

◆ printPipeline()

void AddressSanitizerPass::printPipeline ( raw_ostream OS,
function_ref< StringRef(StringRef)>  MapClassName2PassName 
)

◆ run()

PreservedAnalyses AddressSanitizerPass::run ( Function F,
FunctionAnalysisManager AM 
)

The documentation for this class was generated from the following files: