mirror of
https://github.com/github/codeql.git
synced 2026-05-04 13:15:21 +02:00
Fix bug in handling of subtractions.
This commit is contained in:
@@ -22,3 +22,4 @@
|
||||
| test.cpp:80:8:80:8 | Load: a | VNLength(InitializeParameter: count) | 1 | OpOffset(Load: count) | 1 |
|
||||
| test.cpp:85:8:85:8 | Load: a | VNLength(InitializeParameter: count) | 1 | OpOffset(Add: ... + ...) | 0 |
|
||||
| test.cpp:87:8:87:8 | Load: a | VNLength(InitializeParameter: count) | 1 | OpOffset(Add: ... + ...) | 1 |
|
||||
| test.cpp:89:8:89:8 | Load: a | VNLength(Sub: ... - ...) | 0 | ZeroOffset | 0 |
|
||||
|
||||
@@ -85,4 +85,6 @@ void test2(unsigned int count, bool b) {
|
||||
sink(a); // TODO, should be (count, 1, count, 1), but is (count, 1, count + 1, 0)
|
||||
a += 1;
|
||||
sink(a); // TODO, should be (count, 1, count, 2), but is (count, 1, count + 1, 1)
|
||||
a = (int*) malloc(sizeof(int) * (1024 - count));
|
||||
sink(a); // (1024-count, 0, Zero, 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user