jirislaby / LLVMSlicer

Static Slicer for LLVM
65 stars 22 forks source link

Points-to analysis bug - accessing array elements #6

Open xvitovs1 opened 9 years ago

xvitovs1 commented 9 years ago

When accessing array elements, points-to analysis doesn't work correctly if the elements are accessed by index that changes, e.g. in a cycle:

for (i = 0; i < 10; i++) {
    A[i] = i;
}

There is a problem with determining an offset within the array. Slicer can wrongly remove some statements because of this.

Justme0 commented 9 years ago

If the index is a variable, offset will be 0 in "points to" analysis. It's imprecise.