Skip to content

Commit 1f628d0

Browse files
committed
Ruby: Remove reference to SsaInputNode.
1 parent 95cbd21 commit 1f628d0

File tree

2 files changed

+4
-38
lines changed

2 files changed

+4
-38
lines changed

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll

+3-37
Original file line numberDiff line numberDiff line change
@@ -783,43 +783,9 @@ class SsaDefinitionNodeImpl extends SsaNode {
783783
}
784784
}
785785

786-
/**
787-
* A node that represents an input to an SSA phi (read) definition.
788-
*
789-
* This allows for barrier guards to filter input to phi nodes. For example, in
790-
*
791-
* ```rb
792-
* x = taint
793-
* if x != "safe" then
794-
* x = "safe"
795-
* end
796-
* sink x
797-
* ```
798-
*
799-
* the `false` edge out of `x != "safe"` guards the input from `x = taint` into the
800-
* `phi` node after the condition.
801-
*
802-
* It is also relevant to filter input into phi read nodes:
803-
*
804-
* ```rb
805-
* x = taint
806-
* if b then
807-
* if x != "safe1" then
808-
* return
809-
* end
810-
* else
811-
* if x != "safe2" then
812-
* return
813-
* end
814-
* end
815-
*
816-
* sink x
817-
* ```
818-
*
819-
* both inputs into the phi read node after the outer condition are guarded.
820-
*/
821-
class SsaInputNode extends SsaNode {
822-
override SsaImpl::DataFlowIntegration::SsaInputNode node;
786+
/** A synthesized SSA read. */
787+
class SsaSynthReadNode extends SsaNode {
788+
override SsaImpl::DataFlowIntegration::SsaSynthReadNode node;
823789
}
824790

825791
/** An SSA definition for a `self` variable. */

ruby/ql/test/library-tests/dataflow/barrier-guards/barrier-guards.ql

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module BarrierGuardTest implements TestSig {
2626
tag = "guarded" and
2727
exists(DataFlow::Node n |
2828
newStyleBarrierGuards(n) and
29-
not n instanceof SsaInputNode and
29+
not n instanceof SsaSynthReadNode and
3030
location = n.getLocation() and
3131
element = n.toString() and
3232
value = ""

0 commit comments

Comments
 (0)