Skip to content
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

Escape analysis can't trace flows through recursive functions #16

Open
edwardwawrzynek opened this issue Jun 25, 2020 · 0 comments
Open

Comments

@edwardwawrzynek
Copy link
Owner

edwardwawrzynek commented Jun 25, 2020

Right now, if the escape analyzer finds a call to a function currently being analyzed, it assumes all arguments escape in that call.

Some cases are easy to resolve, but many aren't:

  • Recursive functions which switch arguments around -- ie func(a, b) calls func(b, a)
  • Functions with argument->argument flows
  • Complex mutually recursive functions

Solutions:
Assume no arguments escape from the call, produce function flows, rerun analysis with those flows. Repeat until resulting flows stabilize.

This has major drawbacks:

  • Analysis has to be rerun multiple times.
  • Flows may never stabilize?
@edwardwawrzynek edwardwawrzynek changed the title Escape analysis can Escape analysis can't trace flows through recursive functions Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant