Ruby: Add data-flow test for spurious flow through a reverse store

This commit is contained in:
Tom Hvitved
2022-09-26 11:35:17 +02:00
parent df2b586e7c
commit fea1e47daa
2 changed files with 55 additions and 0 deletions

View File

@@ -1610,4 +1610,7 @@ def m136(i)
a[i][0] = source(136.1)
sink(a[0][0]) # $ hasValueFlow=136.1
sink(a[0][1])
a[1][0] = source(136.2)
sink(a[1][0]) # $ hasValueFlow=136.2 $ SPURIOUS hasValueFlow=136.1
sink(a[2][0]) # $ hasValueFlow=136.1 $ SPURIOUS hasValueFlow=136.2
end