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

tools/syz-fix-analyzer: add the tool #5397

Merged
merged 4 commits into from
Oct 15, 2024

Conversation

dvyukov
Copy link
Collaborator

@dvyukov dvyukov commented Oct 14, 2024

  • pkg/vcs: change HeadCommit to Commit
  • pkg/vcs: expose commit patch
  • go.mod: add github.com/speakeasy-api/git-diff-parser
  • tools/syz-fix-analyzer: add the tool

Currently we have HeadCommit function that returns info
about the HEAD commit. Change it to a more flexible Commit
function that can return info about any commit.
This will be used in future changes.
Add Commit.Patch with patch body.
The tool analyzes fixed bugs on the dashboard
for automatic fixability (known bug type + simple fix).
@dvyukov dvyukov changed the title dvyukov fix analysis tools/syz-fix-analyzer: add the tool Oct 15, 2024
@dvyukov dvyukov marked this pull request as ready for review October 15, 2024 08:57
@dvyukov
Copy link
Collaborator Author

dvyukov commented Oct 15, 2024

The tool does not do full analysis yet, for now it just looks for fix patches with 1 hunk.
Here is the current out on upstream:

Type                   Total    Fixable
NULL deref             604      258  (42.72%)
locking rules          181      35   (19.34%)
double-free            20       7    (35.00%)
out-of-bounds          286      105  (36.71%)
use-after-free         494      104  (21.05%)
data-race              148      20   (13.51%)
shift-out-of-bounds    72       30   (41.67%)
uninit                 336      143  (42.56%)
deadlock               196      24   (12.24%)
memory leak            212      78   (36.79%)
BUG/WARN               352      111  (31.53%)
---
classified             2901     915  (31.54%)
total                  4032     915  (22.69%)

@tarasmadan
Copy link
Collaborator

Looks like a good step forward.

@dvyukov dvyukov added this pull request to the merge queue Oct 15, 2024
Merged via the queue into google:master with commit e76528e Oct 15, 2024
17 checks passed
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

Successfully merging this pull request may close these issues.

2 participants