-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Java: Performance fixes for local flow relation #9195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks plausible to me, just one minor comment.
There are a couple of tricks (namely fastTC
and (any() or strictcount(Node n1, Node n2, AdditionalValueStep a | a.step(n1, n2)) < 0)
) that I would like to learn more about at some point, though :)
java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll
Outdated
Show resolved
Hide resolved
|
f682f3e
to
a4a004a
Compare
csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll
Outdated
Show resolved
Hide resolved
java/ql/lib/semmle/code/java/dataflow/internal/DataFlowUtil.qll
Outdated
Show resolved
Hide resolved
There are some large regressions for Ruby; could be because of the missing pragmas mentioned above. |
DCA looks good now. |
The local flow relation was accidentally made mutually recursive with
AdditionalValueStep
. It makes sense to allow the use for local flow to defineAdditionalValueStep::step
, so removing the latter from the former allows this without recursion.A non-monotonic dummy reference is added to prevent re-introduction of recursion here, and this highlighted the need for a minor refactor in
FlowSummaryImpl
(sinceReturnNodeExt
depends on local flow).The local flow relation is also fixed to force the use of the fastTC hop, as this otherwise was observed to result in a very slow materialisation.