This is the home of osr-diversity
: a compiler-based automated system capable of transforming a C
program to have it realize continuous transfers of control and program state among function variants as they run.
The purpose of this system is to provide dynamic diversity (i.e. the program is kept in a single version, but its executions are diverse) features to an existing C
program by relying on a technique known as on-stack replacement.
The design behind this system is described in the paper Principled Composition of Function Variants for Dynamic Software Diversity and Program Protection which appeared in the ACM ASE 2022 conference.
- Promote the stack variables in your program using the stack variables promotion pass located in
./src/passes/StackVaraPromotion/
- Obtain the IR of the
./src/utils/coin_dice.c
program and link it to the IR of your program with promoted stack variables. - Run the OSR Creator pass located in
./src/passes/OSRCreator
on the IR obtained after following steps 1 & 2.