mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
C++: Fix join orders.
This commit is contained in:
@@ -1209,15 +1209,16 @@ private module Cached {
|
||||
// the operand also flows to the indirction of the instruction.
|
||||
exists(Operand operand, Instruction instr, int indirectionIndex |
|
||||
simpleInstructionLocalFlowStep(operand, instr) and
|
||||
hasOperandAndIndex(nodeFrom, operand, indirectionIndex) and
|
||||
hasInstructionAndIndex(nodeTo, instr, indirectionIndex)
|
||||
hasOperandAndIndex(nodeFrom, operand, pragma[only_bind_into](indirectionIndex)) and
|
||||
hasInstructionAndIndex(nodeTo, instr, pragma[only_bind_into](indirectionIndex))
|
||||
)
|
||||
or
|
||||
// If there's indirect flow to an operand, then there's also indirect
|
||||
// flow to the operand after applying some pointer arithmetic.
|
||||
exists(PointerArithmeticInstruction pointerArith, int indirectionIndex |
|
||||
hasOperandAndIndex(nodeFrom, pointerArith.getAnOperand(), indirectionIndex) and
|
||||
hasInstructionAndIndex(nodeTo, pointerArith, indirectionIndex)
|
||||
hasOperandAndIndex(nodeFrom, pointerArith.getAnOperand(),
|
||||
pragma[only_bind_into](indirectionIndex)) and
|
||||
hasInstructionAndIndex(nodeTo, pointerArith, pragma[only_bind_into](indirectionIndex))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1229,8 +1230,8 @@ private module Cached {
|
||||
exists(Operand operand, Instruction instr, int indirectionIndex |
|
||||
simpleOperandLocalFlowStep(pragma[only_bind_into](instr), pragma[only_bind_into](operand))
|
||||
|
|
||||
hasOperandAndIndex(nodeTo, operand, indirectionIndex) and
|
||||
hasInstructionAndIndex(nodeFrom, instr, indirectionIndex)
|
||||
hasOperandAndIndex(nodeTo, operand, pragma[only_bind_into](indirectionIndex)) and
|
||||
hasInstructionAndIndex(nodeFrom, instr, pragma[only_bind_into](indirectionIndex))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user