mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
Python: type-tracking through dictionary construction
This commit is contained in:
@@ -646,6 +646,8 @@ predicate jumpStepNotSharedWithTypeTracker(Node nodeFrom, Node nodeTo) {
|
||||
*/
|
||||
predicate storeStepCommon(Node nodeFrom, ContentSet c, Node nodeTo) {
|
||||
tupleStoreStep(nodeFrom, c, nodeTo)
|
||||
or
|
||||
dictStoreStep(nodeFrom, c, nodeTo)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -659,8 +661,6 @@ predicate storeStep(Node nodeFrom, ContentSet c, Node nodeTo) {
|
||||
or
|
||||
setStoreStep(nodeFrom, c, nodeTo)
|
||||
or
|
||||
dictStoreStep(nodeFrom, c, nodeTo)
|
||||
or
|
||||
moreDictStoreSteps(nodeFrom, c, nodeTo)
|
||||
or
|
||||
comprehensionStoreStep(nodeFrom, c, nodeTo)
|
||||
|
||||
@@ -38,6 +38,7 @@ typeTracker_found_pointsTo_notFound
|
||||
| code/class_super.py:101:1:101:7 | ControlFlowNode for Attribute() | Z.foo |
|
||||
| code/class_super.py:108:1:108:8 | ControlFlowNode for Attribute() | Z.foo |
|
||||
| code/def_in_function.py:22:5:22:11 | ControlFlowNode for Attribute() | test.A.foo |
|
||||
| code/func_ref_in_content.py:29:1:29:4 | ControlFlowNode for f4() | func |
|
||||
| code/isinstance.py:9:13:9:22 | ControlFlowNode for Attribute() | A.foo |
|
||||
| code/isinstance.py:9:13:9:22 | ControlFlowNode for Attribute() | ASub.foo |
|
||||
| code/isinstance.py:14:13:14:22 | ControlFlowNode for Attribute() | A.foo |
|
||||
|
||||
@@ -26,7 +26,7 @@ def return_func_in_dict():
|
||||
dct = return_func_in_dict() # $ pt,tt=return_func_in_dict
|
||||
|
||||
f4 = dct['func']
|
||||
f4() # $ MISSING: tt=func
|
||||
f4() # $ tt=func
|
||||
|
||||
|
||||
def return_func_in_dict_update():
|
||||
|
||||
Reference in New Issue
Block a user