-
Notifications
You must be signed in to change notification settings - Fork 66
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
Basic implementation of following context-sensitive calls in followNextDFGUntilHit
#1988
Conversation
…extDFGUntilHit` I am not sure if this really solves *all* the problems, but at least this tries to use the information that we have in the calling context in/out so that we are properly following dataflows into functions and out of functions using the correct call (stack).
7894803
to
053202e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
☔ View full report in Codecov by Sentry. |
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 like that we will provide a context sensitive analysis. However, we should take care of few aspects:
- maintainability of the selection of the "next step" for
followXUntilHit
is getting increasingly complex with a number of similar code fragments (push on stack, pop from stack, select subset of edges, ...) prevDFG
does not have this feature- The computational complexity will increase if we cannot disable certain stacks in the long term. We should keep this in mind when running it on larger code bases and allow configuring the precision.
- Some functions already provide an interprocedural analysis and probably miss it (e.g. following the PDG, CDG), the EOG does not feature this at all.
I'm fine with the changes but we should discuss how to design a cleaner interface here in the next weeks.
cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/Extensions.kt
Outdated
Show resolved
Hide resolved
cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/Extensions.kt
Outdated
Show resolved
Hide resolved
…extDFGUntilHit` (#1988) * Basic implementation of following context-sensitive calls in `followNextDFGUntilHit` I am not sure if this really solves *all* the problems, but at least this tries to use the information that we have in the calling context in/out so that we are properly following dataflows into functions and out of functions using the correct call (stack). * Added flakey test to demonstrate problem * Using a cloned stack, but somehow still does not work * More robust implementation * Added self * Addressed code review
…extDFGUntilHit` (#1988) * Basic implementation of following context-sensitive calls in `followNextDFGUntilHit` I am not sure if this really solves *all* the problems, but at least this tries to use the information that we have in the calling context in/out so that we are properly following dataflows into functions and out of functions using the correct call (stack). * Added flakey test to demonstrate problem * Using a cloned stack, but somehow still does not work * More robust implementation * Added self * Addressed code review
I am not sure if this really solves all the problems, but at least this tries to use the information that we have in the calling context in/out so that we are properly following dataflows into functions and out of functions using the correct call (stack).