Research Article

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

Listing 6

LLVM-IR code (uninstrumented) for C code presented in Listing 5.
//Lines 1-2 represent LLV-IR code for lines 1-2 of C code in Listing 5
1:%call = call noalias i8  @malloc (i64 80) #2
2:store i8  %call, i8  @buffer, align 8
//Lines 3-7 represent LLV-IR code for line 3 of C code in Listing 5
3:%0 = load i8  @buffer, align 8
4:%arrayidx = getelementptr inbounds i8  %argv, i64 1
5:%1 = load i8  %arrayidx, align 8
6:% call1 = call i8  @strcpy (i8  %0, i8  %1) #2
7:ret i32 0