mirror of
https://github.com/github/codeql.git
synced 2026-03-13 19:16:46 +01:00
Flow from a definition by reference of a field into its object was working inconsistently and in a very syntax-dependent way. For a function `f` receiving a reference, `f(a->x)` could propagate data back to `a` via the _reverse read_ mechanism in the shared data-flow library, but for a function `g` receiving a pointer, `g(&a->x)` would not work. And `f((*a).x)` would not work either. In all cases, the issue was that the shared data-flow library propagates data backwards between `PostUpdateNode`s only, but there is no `PostUpdateNode` for `a->x` in `g(&a->x)`. This pull request inserts such post-update nodes where appropriate and links them to their neighbors. In this exapmle, flow back from the output parameter of `g` passes first to the `PostUpdateNode` of `&`, then to the (new) `PostUpdateNode` of `a->x`, and finally, as a _reverse read_ with the appropriate field projection, to `a`.
32 lines
1.2 KiB
Plaintext
32 lines
1.2 KiB
Plaintext
uniqueEnclosingCallable
|
|
uniqueTypeBound
|
|
uniqueTypeRepr
|
|
uniqueNodeLocation
|
|
| dispatch.cpp:60:18:60:29 | call to Bottom | Node should have one location but has 2. |
|
|
| dispatch.cpp:61:18:61:29 | call to Middle | Node should have one location but has 2. |
|
|
| dispatch.cpp:65:10:65:21 | call to Bottom | Node should have one location but has 2. |
|
|
| file://:0:0:0:0 | call to Bottom | Node should have one location but has 2. |
|
|
| file://:0:0:0:0 | call to Bottom | Node should have one location but has 2. |
|
|
| file://:0:0:0:0 | call to Middle | Node should have one location but has 2. |
|
|
missingLocation
|
|
uniqueNodeToString
|
|
missingToString
|
|
parameterCallable
|
|
localFlowIsLocal
|
|
compatibleTypesReflexive
|
|
unreachableNodeCCtx
|
|
localCallNodes
|
|
postIsNotPre
|
|
postHasUniquePre
|
|
uniquePostUpdate
|
|
postIsInSameCallable
|
|
reverseRead
|
|
storeIsPostUpdate
|
|
argHasPostUpdate
|
|
| lambdas.cpp:18:7:18:7 | a | ArgumentNode is missing PostUpdateNode. |
|
|
| lambdas.cpp:25:2:25:2 | b | ArgumentNode is missing PostUpdateNode. |
|
|
| lambdas.cpp:32:2:32:2 | c | ArgumentNode is missing PostUpdateNode. |
|
|
| lambdas.cpp:38:2:38:2 | d | ArgumentNode is missing PostUpdateNode. |
|
|
| lambdas.cpp:45:2:45:2 | e | ArgumentNode is missing PostUpdateNode. |
|
|
| test.cpp:67:29:67:35 | source1 | ArgumentNode is missing PostUpdateNode. |
|