mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Ruby: Remove reference to SsaInputNode.
This commit is contained in:
@@ -783,43 +783,9 @@ class SsaDefinitionNodeImpl extends SsaNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** A synthesized SSA read. */
|
||||||
* A node that represents an input to an SSA phi (read) definition.
|
class SsaSynthReadNode extends SsaNode {
|
||||||
*
|
override SsaImpl::DataFlowIntegration::SsaSynthReadNode node;
|
||||||
* This allows for barrier guards to filter input to phi nodes. For example, in
|
|
||||||
*
|
|
||||||
* ```rb
|
|
||||||
* x = taint
|
|
||||||
* if x != "safe" then
|
|
||||||
* x = "safe"
|
|
||||||
* end
|
|
||||||
* sink x
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* the `false` edge out of `x != "safe"` guards the input from `x = taint` into the
|
|
||||||
* `phi` node after the condition.
|
|
||||||
*
|
|
||||||
* It is also relevant to filter input into phi read nodes:
|
|
||||||
*
|
|
||||||
* ```rb
|
|
||||||
* x = taint
|
|
||||||
* if b then
|
|
||||||
* if x != "safe1" then
|
|
||||||
* return
|
|
||||||
* end
|
|
||||||
* else
|
|
||||||
* if x != "safe2" then
|
|
||||||
* return
|
|
||||||
* end
|
|
||||||
* end
|
|
||||||
*
|
|
||||||
* sink x
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* both inputs into the phi read node after the outer condition are guarded.
|
|
||||||
*/
|
|
||||||
class SsaInputNode extends SsaNode {
|
|
||||||
override SsaImpl::DataFlowIntegration::SsaInputNode node;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** An SSA definition for a `self` variable. */
|
/** An SSA definition for a `self` variable. */
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ module BarrierGuardTest implements TestSig {
|
|||||||
tag = "guarded" and
|
tag = "guarded" and
|
||||||
exists(DataFlow::Node n |
|
exists(DataFlow::Node n |
|
||||||
newStyleBarrierGuards(n) and
|
newStyleBarrierGuards(n) and
|
||||||
not n instanceof SsaInputNode and
|
not n instanceof SsaSynthReadNode and
|
||||||
location = n.getLocation() and
|
location = n.getLocation() and
|
||||||
element = n.toString() and
|
element = n.toString() and
|
||||||
value = ""
|
value = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user