Skip to content

Commit 98f51d7

Browse files
committed
Dataflow: Sync.
1 parent 97b2bda commit 98f51d7

File tree

5 files changed

+40
-0
lines changed

5 files changed

+40
-0
lines changed

csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,9 @@ module Private {
505505
or
506506
// Add the post-update node corresponding to the requested argument node
507507
outputState(c, s) and isCallbackParameter(s)
508+
or
509+
// Add the parameter node for parameter side-effects
510+
outputState(c, s) and s = SummaryComponentStack::argument(_)
508511
}
509512

510513
private newtype TSummaryNodeState =
@@ -713,6 +716,11 @@ module Private {
713716
head = TSyntheticGlobalSummaryComponent(sg) and
714717
result = getSyntheticGlobalType(sg)
715718
)
719+
or
720+
exists(ParameterPosition pos |
721+
head = TArgumentSummaryComponent(pos) and
722+
result = getParameterType(c, pos)
723+
)
716724
)
717725
or
718726
n = summaryNodeOutputState(c, s) and

go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,9 @@ module Private {
505505
or
506506
// Add the post-update node corresponding to the requested argument node
507507
outputState(c, s) and isCallbackParameter(s)
508+
or
509+
// Add the parameter node for parameter side-effects
510+
outputState(c, s) and s = SummaryComponentStack::argument(_)
508511
}
509512

510513
private newtype TSummaryNodeState =
@@ -713,6 +716,11 @@ module Private {
713716
head = TSyntheticGlobalSummaryComponent(sg) and
714717
result = getSyntheticGlobalType(sg)
715718
)
719+
or
720+
exists(ParameterPosition pos |
721+
head = TArgumentSummaryComponent(pos) and
722+
result = getParameterType(c, pos)
723+
)
716724
)
717725
or
718726
n = summaryNodeOutputState(c, s) and

python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,9 @@ module Private {
505505
or
506506
// Add the post-update node corresponding to the requested argument node
507507
outputState(c, s) and isCallbackParameter(s)
508+
or
509+
// Add the parameter node for parameter side-effects
510+
outputState(c, s) and s = SummaryComponentStack::argument(_)
508511
}
509512

510513
private newtype TSummaryNodeState =
@@ -713,6 +716,11 @@ module Private {
713716
head = TSyntheticGlobalSummaryComponent(sg) and
714717
result = getSyntheticGlobalType(sg)
715718
)
719+
or
720+
exists(ParameterPosition pos |
721+
head = TArgumentSummaryComponent(pos) and
722+
result = getParameterType(c, pos)
723+
)
716724
)
717725
or
718726
n = summaryNodeOutputState(c, s) and

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,9 @@ module Private {
505505
or
506506
// Add the post-update node corresponding to the requested argument node
507507
outputState(c, s) and isCallbackParameter(s)
508+
or
509+
// Add the parameter node for parameter side-effects
510+
outputState(c, s) and s = SummaryComponentStack::argument(_)
508511
}
509512

510513
private newtype TSummaryNodeState =
@@ -713,6 +716,11 @@ module Private {
713716
head = TSyntheticGlobalSummaryComponent(sg) and
714717
result = getSyntheticGlobalType(sg)
715718
)
719+
or
720+
exists(ParameterPosition pos |
721+
head = TArgumentSummaryComponent(pos) and
722+
result = getParameterType(c, pos)
723+
)
716724
)
717725
or
718726
n = summaryNodeOutputState(c, s) and

swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,9 @@ module Private {
505505
or
506506
// Add the post-update node corresponding to the requested argument node
507507
outputState(c, s) and isCallbackParameter(s)
508+
or
509+
// Add the parameter node for parameter side-effects
510+
outputState(c, s) and s = SummaryComponentStack::argument(_)
508511
}
509512

510513
private newtype TSummaryNodeState =
@@ -713,6 +716,11 @@ module Private {
713716
head = TSyntheticGlobalSummaryComponent(sg) and
714717
result = getSyntheticGlobalType(sg)
715718
)
719+
or
720+
exists(ParameterPosition pos |
721+
head = TArgumentSummaryComponent(pos) and
722+
result = getParameterType(c, pos)
723+
)
716724
)
717725
or
718726
n = summaryNodeOutputState(c, s) and

0 commit comments

Comments
 (0)