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

Analyze unsafe code reachability #3546

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

celinval
Copy link
Contributor

Add call graph analysis to scanner in order to find the distance between functions in a crate and unsafe functions.

For that, we build the crate call graph and collect the unsafe functions. After that, do reverse BFS traversal from the unsafe functions and store the distance to other functions. The result is stored in a new csv file.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@celinval celinval requested a review from a team as a code owner September 24, 2024 14:47
@github-actions github-actions bot added the Z-BenchCI Tag a PR to run benchmark CI label Sep 24, 2024
@celinval celinval force-pushed the issue-xxxx-transitive-scan branch from c208237 to 37bcc09 Compare September 24, 2024 14:50
Add callgraph analysis to scanner in order to find the distance between
functions in a crate and unsafe functions.

For that, we build the crate call graph and collect the unsafe
functions. After that, do reverse BFS traversal from the unsafe
functions and store the distance to other functions.
The result is stored in a new csv file.
@celinval celinval force-pushed the issue-xxxx-transitive-scan branch from 37bcc09 to c3d305f Compare September 24, 2024 14:54
docs/src/rustc-hacks.md Outdated Show resolved Hide resolved
scripts/std-analysis.sh Outdated Show resolved Hide resolved
tests/script-based-pre/tool-scanner/test.rs Outdated Show resolved Hide resolved
tools/scanner/src/call_graph.rs Outdated Show resolved Hide resolved
tools/scanner/src/analysis.rs Outdated Show resolved Hide resolved
@celinval celinval force-pushed the issue-xxxx-transitive-scan branch from 025fe87 to a4198ac Compare January 31, 2025 20:43
github-merge-queue bot pushed a commit that referenced this pull request Jan 31, 2025
The old hack doesn't work anymore.

I pulled this from #3546 per PR comment

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-BenchCI Tag a PR to run benchmark CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants