Python points-to: Improve handling of subscripts and sequence inequalities.

This commit is contained in:
Mark Shannon
2019-04-24 16:50:54 +01:00
parent 674a3da4b8
commit 3bb61e7410
12 changed files with 169 additions and 19 deletions

View File

@@ -1,3 +1,5 @@
WARNING: Predicate points_to has been deprecated and may be removed in future (BooleanConstants.ql:8,5-24)
WARNING: Predicate points_to has been deprecated and may be removed in future (BooleanConstants.ql:11,5-24)
| module.py | 2 | ControlFlowNode for ImportExpr | import | true |
| module.py | 2 | ControlFlowNode for sys | import | true |
| module.py | 3 | ControlFlowNode for Compare | import | false |

View File

@@ -1,13 +1,7 @@
/**
* @name Naive
* @description Insert description here...
* @kind table
* @problem.severity warning
*/
import python
import semmle.python.pointsto.PointsTo
from ControlFlowNode f, Location l
where not PointsTo::Test::reachableBlock(f.getBasicBlock(), _) and l = f.getLocation() and l.getFile().getName().matches("%test.py")
where not PointsToInternal::reachableBlock(f.getBasicBlock(), _) and l = f.getLocation() and l.getFile().getName().matches("%test.py")
select l.getStartLine()