зеркало из https://github.com/github/codeql.git
C++ IR: Fix SignAnalysis after getAnyDef -> getDef
In the `SignAnalysis` abstract interpretation, "unknown sign" corresponds to the set of _all_ `Sign`, but using `getDef` leads to the operand having _no_ `Sign`. To fix that, we assign all signs to inexact operands.
This commit is contained in:
Родитель
52cfbffb95
Коммит
c831c4b58e
|
@ -368,6 +368,9 @@ cached module SignAnalysisCached {
|
||||||
or
|
or
|
||||||
result = guardedOperandSign(operand) and
|
result = guardedOperandSign(operand) and
|
||||||
result = guardedOperandSignOk(operand)
|
result = guardedOperandSignOk(operand)
|
||||||
|
or
|
||||||
|
// `result` is unconstrained if the definition is inexact. Then any sign is possible.
|
||||||
|
operand.isDefinitionInexact()
|
||||||
}
|
}
|
||||||
|
|
||||||
cached
|
cached
|
||||||
|
|
Загрузка…
Ссылка в новой задаче