diffkemp icon indicating copy to clipboard operation
diffkemp copied to clipboard

VarDependencySlicer should distinguish between read and write accesses.

Open viktormalik opened this issue 6 years ago • 0 comments

If some GEP instruction occurs in a basic block whose execution depends on the global variable and then it appears in some other block, the second occurrence is treated as dependent even if both accesses are read-only (and hence the value of the global variable could affect the value being read). In this situation, the second occurrence of the GEP should be sliced out. To do this, the slicer probably needs to distinguish between read and write accesses.

The bug can be replicated by running:

bin/diffkemp 3.10 4.11 sound/pci -m snd_intel8x0 -p buggy_irq

The function snd_intel8x0_probe should be evaluated as having equal syntax, since only the if condition containing buggy_irq should be kept. However, the read of pci_id->driver_data in this block causes the following read of the same field in the call of snd_intel8x0_create to be treated as dependent.

viktormalik avatar Apr 09 '19 09:04 viktormalik