-
Couldn't load subscription status.
- Fork 1.8k
Update diff-informed testing to always treat sources and sinks as alert locations #20607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3fa8259
890ca8e
bb10307
d36b721
78f2cee
9c24ce0
a972ef7
1243c63
5a1a887
ad31f1a
ba22f0d
7722f31
59a8e9b
913550f
a228936
1129230
b023880
4482e83
dc1dff9
9eeeec3
eebff9c
247ae1d
72a9777
697f428
2a889f4
4439322
518c081
f24a6f6
2a30ea9
71cf042
9434325
bcdbe0b
bb80d83
baccdcc
37fff48
6d57316
4bc9ede
998de14
1ff24cb
6519bd9
50f2540
495be51
6ede0a7
462d8c5
2332cea
c190fae
6c52d4b
7ba7c43
5a6f731
cd86e7d
895bd93
8a750b3
1f53ffb
edc72d2
c402233
62fde8f
974d174
464f6cb
65d79ff
a4ac039
2756e82
f7a1a4c
0ed27f4
17b261a
d89aa0f
b018040
bbe2bf2
1321cbb
f3d51e0
a65d4d5
ec63547
d41268f
0f0bd0f
4952cb2
8e0c453
96e1536
a0975e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,7 +124,8 @@ module UncontrolledArithConfig implements DataFlow::ConfigSig { | |
| predicate observeDiffInformedIncrementalMode() { any() } | ||
|
|
||
| Location getASelectedSourceLocation(DataFlow::Node source) { | ||
| result = getExpr(source).getLocation() | ||
| isSource(source) and | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not necessary for correctness, but it reduces the size of |
||
| result = [getExpr(source).getLocation(), source.getLocation()] | ||
| } | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -132,7 +132,7 @@ module UnhandledFileCloseConfig implements DataFlow::ConfigSig { | |||||||||||
| predicate observeDiffInformedIncrementalMode() { any() } | ||||||||||||
|
|
||||||||||||
| Location getASelectedSourceLocation(DataFlow::Node source) { | ||||||||||||
| exists(DataFlow::CallNode openCall | result = openCall.getLocation() | | ||||||||||||
| exists(DataFlow::CallNode openCall | result = [openCall.getLocation(), source.getLocation()] | | ||||||||||||
| isWritableFileHandle(source, openCall) | ||||||||||||
|
Comment on lines
+135
to
136
|
||||||||||||
| exists(DataFlow::CallNode openCall | result = [openCall.getLocation(), source.getLocation()] | | |
| isWritableFileHandle(source, openCall) | |
| exists(DataFlow::CallNode openCall | | |
| isWritableFileHandle(source, openCall) and | |
| (result = openCall.getLocation() or result = source.getLocation()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, great. A sink location is only relevant if the below holds.