-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Swift: switch to shared, parameterized CFG library #15219
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
Swift: switch to shared, parameterized CFG library #15219
Conversation
swift/ql/lib/codeql/swift/controlflow/internal/ControlFlowGraphParameter.qll
Fixed
Show fixed
Hide fixed
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 good, but there are some odds and ends to finish:
- needs a change note and autoformat.
- fix for the
CfgConsistency
tests (it looks like they're trying toimport
an old file). - plus see my two comments
abovebelow. - then a DCA run to check for regressions / build confidence.
swift/ql/lib/codeql/swift/controlflow/internal/ControlFlowGraphParameter.qll
Outdated
Show resolved
Hide resolved
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.
This LGTM! I think we should merge the new ControlFlowGraphParameter.qll
file into ControlFlowGraphImplSpecific.qll
, but otherwise I think the only real thing we need here is a DCA run!
--- | ||
category: minorAnalysis | ||
--- | ||
* The control flow graph library (`codeql.swift.controlflow`) has been transitioned to use the shared implementation from the `codeql/controlflow` qlpack. No result changes are expected due to this change. |
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.
I'm not sure I would have put a change note here (since no users are expected to notice this change), but I guess it doesn't hurt 😄
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.
Ah, that's my fault - I asked for a change note because the check was failing, without thinking about whether should have just added the flag to say that one is not required. I agree it doesn't do any harm.
swift/ql/lib/codeql/swift/controlflow/internal/ControlFlowGraphParameter.qll
Outdated
Show resolved
Hide resolved
@@ -1,3 +1,252 @@ | |||
#-----| ... = ... |
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.
Awesome! Are these changes all from a9c9170?
bf31913
to
ec6d8da
Compare
Changes LGTM and I think the DCA run LGTM as well (no result changes, analysis time possibly a speedup). Though I am slightly worried by the join-order badness (v1) result for |
That does look like a bad join order that's worth investigating, but it doesn't look like it's actually new - the tuple sum went up by 7802, but the max tuple count for a row is 17186585 both before and after. |
Indeed, running this with |
This fixes the join: #15348 |
No description provided.