How heaplab/aspis works
ASPIS is an out-of-tree LLVM IR plugin for software-based fault detection. Its main workflow takes C/C++ through a frontend into LLVM IR, applies data-protection and control-flow-checking passes, then emits an executable whose fault paths call user-provided handlers. Users can run the built-in aspis.sh pipeline or assemble a custom pipeline with LLVM opt. The graph preserves the documented pass alternatives and ordering; unsampled pipeline wiring is based on the README rather than inspected implementation.
Main entry points: Utils.cpp Pass utilities · EDDI.cpp EDDI duplication · aspis.sh Pipeline CLI · FuncRetToRef.cpp Return conversion
Components 17
Compilation workflow
- Clang frontend
- LLVM IR
- Pipeline CLI
aspis.sh - LLVM opt
- Hardened executable
- Fault handlers
Data protection
- Return conversion
passes/FuncRetToRef.cpp - EDDI duplication
passes/EDDI.cpp - Global duplication
passes/DuplicateGlobals.cpp
Control-flow checking
- CFCSS checks
passes/CFCSS.cpp - RASM checks
passes/RASM.cpp - RACFED checks
passes/RACFED.cpp
Profiling and shared utilities
- Check profiler
passes/Profiling/ASPISCheckProfiler.cpp - Profiler instrumentation
passes/Profiling/ASPISCheckProfiler.cpp - Pass utilities
passes/Utils/Utils.cpp - Pass declarations
passes/ASPIS.h
Other components
- Developer
Connections 29
- Developer → Clang frontend: compiles source
README.md - Clang frontend → LLVM IR: emits IR
README.md - Developer → Pipeline CLI: runs pipeline
README.md - Pipeline CLI → Clang frontend: invokes compilation
README.md - Pipeline CLI → LLVM opt: runs passes
README.md - Developer → LLVM opt: builds custom pipeline
README.md - LLVM IR → LLVM opt: transforms IR
README.md - LLVM opt → Return conversion: applies first
README.md - LLVM opt → EDDI duplication: applies data pass
README.md - LLVM opt → CFCSS checks: selects alternative
README.md - LLVM opt → RASM checks: selects alternative
README.md - LLVM opt → RACFED checks: selects alternative
README.md - LLVM opt → Global duplication: applies last
README.md - Return conversion → EDDI duplication: precedes
README.md - EDDI duplication → Global duplication: precedes
README.md - LLVM opt → Hardened executable: emits output
README.md - Hardened executable → Fault handlers: calls on fault
README.md - Developer → Fault handlers: provides
README.md - LLVM opt → Check profiler: runs analysis
- LLVM opt → Profiler instrumentation: instruments checks
- EDDI duplication → Pass utilities: uses helpers
passes/EDDI.cpp - CFCSS checks → Pass utilities: uses helpers
passes/CFCSS.cpp - RASM checks → Pass utilities: uses helpers
- RACFED checks → Pass utilities: uses helpers
passes/RACFED.cpp - Return conversion → Pass utilities: uses helpers
- Global duplication → Pass utilities: uses helpers
passes/DuplicateGlobals.cpp - Check profiler → Pass utilities: uses helpers
- Profiler instrumentation → Pass utilities: uses helpers
- Pass declarations → Pass utilities: includes declarations
passes/ASPIS.h