Skip to content

Shared: Generate more value-preserving summaries #19409

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

MathiasVP
Copy link
Contributor

@MathiasVP MathiasVP commented Apr 29, 2025

Ideally, we want generated flow summaries to be content-sensitive. That is, a summary for a function such as:

int read_f(S* s) { return s->f; }

should specify that we read the content f from Argument[*0].

However, if a function is super complex it may read/write many access paths, and this could cause an explosion in the number of summaries we generate.

To mitigate this, the flow summary generation library puts various restrictions on which callables receive content-sensitive summaries.

When a content-sensitive summary isn't generated, we currently fall back to a taint-configuration-based summary which means we only generate a taint summary and not a value-preserving summary.

This PR adds a "midpoint" in between the content-sensitive value-preserving summary and the taint-based summary so that we now:

  • First check if we can generate a content-sensitive summary,
  • If not, we check if we can generate a value-preserving summary,
  • and finally, if that fails we check if we can generate a taint-based summary.

This seems to generate much better models on OpenSSL in particular.

@github-actions github-actions bot added C++ C# Java Rust Pull requests that update Rust code labels Apr 29, 2025
@MathiasVP MathiasVP force-pushed the infer-value-preserving-summaries branch 8 times, most recently from e16a07c to d8a50eb Compare April 30, 2025 15:29
@MathiasVP MathiasVP force-pushed the infer-value-preserving-summaries branch from d8a50eb to 5c1eed1 Compare April 30, 2025 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C# C++ Java Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant