Open HongshuW opened 1 week ago
Failure due to nature of the algorithm.
To fix this bug, we need to add a basic block alignment module to align each jump in the code, which is a huge change to the algorithm.
This algorithm will never find root cause in the following programs.
correct
def func():
global x
x = 1
return
x = 2
func()
assert(x == 1)
buggy
def func():
global x
x = 1
x = 2
func()
assert(x == 1)
To fix this bug, we need to align each basic block and insert fake jump operations. For this example, a fake line in buggy will be added.
buggy
def func():
global x
x = 1
if False: return # Fake line added to align the "return" statement in the correct program.
x = 2
This could not be solved by mending. Because, using mending, you will know which trace make a step be executed. But you will not know why a step is not executed. Consider if there is a jump statement, you will not know which jump statement is wrong so that a step is not executed.