Research Article
Tag-Protector: An Effective and Dynamic Detection of Illegal Memory Accesses through Compile Time Code Instrumentation
Algorithm 1
Stage 1: function duplication with modified argument list to enable tag marks for functions that take pointers as arguments.
Input: Uninstrumented LLVM-IR code generated through LLVM llvm-link command | Output: Instrumented LLVM-IR code generated through LLVM opt command using stage-1 of tag-protection pass | Create | for each function declared in do | if has definition in place and arguments contain pointer memory objects then | Create a function clone of . Create two new pointer | arguments ( and ) for each pointer argument in | argument list. Store function name of and in | end | end | Save modified LLVM-IR code as semi instrumented LLVM-IR code |
|