mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
Python points-to. Fix descriptor behviour of Python functions.
This commit is contained in:
@@ -129,7 +129,12 @@ class PythonFunctionObjectInternal extends CallableObjectInternal, TPythonFuncti
|
||||
override boolean isDescriptor() { result = true }
|
||||
|
||||
override predicate descriptorGet(ObjectInternal instance, ObjectInternal value, CfgOrigin origin) {
|
||||
instance.isClass() = false and
|
||||
value = TBoundMethod(instance, this) and origin = CfgOrigin::unknown()
|
||||
or
|
||||
any(ObjectInternal obj).binds(instance, _, this) and
|
||||
instance.isClass() = true and
|
||||
value = this and origin = CfgOrigin::fromCfgNode(this.getOrigin())
|
||||
}
|
||||
|
||||
override CallNode getACall(PointsToContext ctx) {
|
||||
|
||||
Reference in New Issue
Block a user