Module execute

Module execute 

Source
Expand description

Compiles the target executable with LLVM instrumentation embedded.

Available sanitizers12:

  • linux: address, cfi, leak, memory, safe-stack, thread, undefined
  • macos: address, thread, undefined
  • win10: address, undefined

Enable sanitizers by setting CFLAGS in the environment, e.g.

export CFLAGS="-fsanitize=memory,undefined"

Examples of options that can be passed to the compiler

export CFLAGS="-O3 -mshstk -mllvm -polly -std=c17 -g -fcolor-diagnostics -fuse-ld=lld -L/opt/lib -D_FORTIFY_SOURCE=3 -fstack-protector-all -fcf-protection=full -flto -fvisibility=hidden"

Further reading: https://clang.llvm.org/docs/ClangCommandLineReference.html https://developers.redhat.com/articles/2022/06/02/use-compiler-flags-stack-protection-gcc-and-clang

Structs§

Exec

Enums§

CoverageResult
ExecResult

Constants§

SANITIZERS