Research Article

Tag-Protector: An Effective and Dynamic Detection of Illegal Memory Accesses through Compile Time Code Instrumentation

Algorithm 4

Stage 4: interprocedural tag propagation.
Input: Instrumented LLVM-IR code generated in stage-3 of tag-protection pass; memory
   map table and ;
Output: Instrumented LLVM-IR code generated through LLVM opt command using stage-4
  of tag-protection pass
for each function definition in do
 for each instruction in do
  if is a function call instruction then
   Get function name being called by instruction
   if function called by is present in . then
    Retrieve respective from .
    Create new function call instruction pointing to .
    for each pointer function argument in do
      Retrieve respective and marks from and add
      them to argument list.
    end
    Remove instruction and replace it with .
   end
  end
 end
end
Delete memory map table Save modified LLVM-IR code as an instrumented LLVM-IR code