Skip to content

Add/implement isReachable()/pathsTo() for control flow #321

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

Open
blipper opened this issue Apr 17, 2021 · 2 comments
Open

Add/implement isReachable()/pathsTo() for control flow #321

blipper opened this issue Apr 17, 2021 · 2 comments
Assignees
Labels
check for relevance Needs check whether this issue is still relevant and if so what to do about it

Comments

@blipper
Copy link
Contributor

blipper commented Apr 17, 2021

Is your feature request related to a problem? Please describe.
I am writing a plugin to determine if a set of constant values can propagate to a certain function with a parameter that is tagged with an LLVM IR custom attribute. I want a way to check from the entry point (or really any function) if there is a path that function to the target function.

This will allow me to select a set of paths so that I can only propogate constants along the paths to the target function

Describe the solution you'd like
Something that does this?

Describe alternatives you've considered
Maybe a backward analysis to the entry points but still need paths to get there.

Additional context
Example code

void crypt(int attribute((annotate("crypto_iv_size")) iv_size) {
}

int main() {
const int kIVSize = 8;
crypt(kIVSize);
}

@MMory MMory self-assigned this Apr 26, 2021
@MMory
Copy link
Member

MMory commented Apr 26, 2021

If I understand your request right this functionality should already be present: run the analysis that propagates your values of interest and then use resultsAt() at the location of interest and check whether the returned set of data-flow fact contains the LLVM values of interest.

@pdschubert
Copy link
Member

pathTo functionalities that allow for path-sensitive data-flow analysis have been implemented. We will merge them to open-source PhASAR soon.

@MMory MMory added the check for relevance Needs check whether this issue is still relevant and if so what to do about it label Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
check for relevance Needs check whether this issue is still relevant and if so what to do about it
Projects
None yet
Development

No branches or pull requests

3 participants