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

junit: Fix CLI runs on individual files #819

Merged
merged 4 commits into from
Aug 14, 2023
Merged

Conversation

fmeum
Copy link
Contributor

@fmeum fmeum commented Aug 11, 2023

When all user-provided libFuzzer path arguments are files, the JUnit
executor now correctly starts libFuzzer in reproduction mode by not
adding any directories to the command line. In particular, this fixes
a crash when Jazzer is invoked on a single file to reproduce a
particular finding.

@fmeum fmeum requested a review from a team August 11, 2023 12:50
@fmeum fmeum force-pushed the FUZZ-782-fix-junit-reproducer branch 2 times, most recently from 89b7666 to c656ec3 Compare August 14, 2023 05:24
@bertschneider bertschneider self-requested a review August 14, 2023 06:53
@fmeum fmeum force-pushed the FUZZ-782-fix-junit-reproducer branch from c656ec3 to 6063916 Compare August 14, 2023 06:53
@bertschneider bertschneider removed their request for review August 14, 2023 06:56
@ci-fuzz-check
Copy link

ci-fuzz-check bot commented Aug 14, 2023

findings-found-icon 1 open finding detected  View Findings
The final number may be higher than displayed as the scan progresses in the background. For more information, check the Code Intelligence Documentation

@fmeum fmeum marked this pull request as draft August 14, 2023 08:09
@ci-fuzz-check
Copy link

ci-fuzz-check bot commented Aug 14, 2023

findings-found-icon 1 open finding detected  View Findings
The final number may be higher than displayed as the scan progresses in the background. For more information, check the Code Intelligence Documentation

@fmeum fmeum force-pushed the FUZZ-782-fix-junit-reproducer branch from 16625cb to 4f90ebe Compare August 14, 2023 08:28
@ci-fuzz-check
Copy link

ci-fuzz-check bot commented Aug 14, 2023

findings-found-icon 1 open finding detected  View Findings
The final number may be higher than displayed as the scan progresses in the background. For more information, check the Code Intelligence Documentation

@fmeum fmeum force-pushed the FUZZ-782-fix-junit-reproducer branch from 4f90ebe to bebc967 Compare August 14, 2023 11:05
@fmeum
Copy link
Contributor Author

fmeum commented Aug 14, 2023

@br-lewis @bertschneider The finding is an NPE in Helpers#assertMutator, which makes me think that the fuzz test may not be executed with the experimental mutator. The experimental mutator would honor the @NotNull annotation, Autofuzz doesn't.

@ci-fuzz-check
Copy link

ci-fuzz-check bot commented Aug 14, 2023

findings-found-icon 1 open finding detected  View Findings
The final number may be higher than displayed as the scan progresses in the background. For more information, check the Code Intelligence Documentation

@fmeum fmeum force-pushed the FUZZ-782-fix-junit-reproducer branch from bebc967 to ec50431 Compare August 14, 2023 11:23
@fmeum fmeum marked this pull request as ready for review August 14, 2023 11:23
@fmeum
Copy link
Contributor Author

fmeum commented Aug 14, 2023

This is ready for review again, I fixed the Windows CI issue.

@ci-fuzz-check
Copy link

ci-fuzz-check bot commented Aug 14, 2023

findings-found-icon 1 open finding detected  View Findings
The final number may be higher than displayed as the scan progresses in the background. For more information, check the Code Intelligence Documentation

Disable git's automatic LF/CRLF conversion. We aim to support Windows
builds from source as is and seed files can be sensitive to line
endings.
When all user-provided libFuzzer path arguments are files, the JUnit
executor now correctly starts libFuzzer in reproduction mode by not
adding any directories to the command line. In particular, this fixes
a crash when Jazzer is invoked on a single file to reproduce a
particular finding.
@fmeum fmeum force-pushed the FUZZ-782-fix-junit-reproducer branch from ec50431 to b20c6c2 Compare August 14, 2023 11:30
@ci-fuzz-check
Copy link

ci-fuzz-check bot commented Aug 14, 2023

findings-found-icon 1 open finding detected  View Findings
The final number may be higher than displayed as the scan progresses in the background. For more information, check the Code Intelligence Documentation

@bertschneider
Copy link
Contributor

@fmeum Yes, you're right! Only the bazel tests used the experimental mutator. Due to the previous CI Sense integration problems we didn't notice the missing flag in cifuzz.yaml.

The experimental mutator can be enabled by adding the following snippet to cifuzz.yaml:

 engine-args:
  - --experimental_mutator

Do you want to enable the experimental mutator in this PR or should I create a new one?

@fmeum
Copy link
Contributor Author

fmeum commented Aug 14, 2023

Will do, thanks for the pointer!

Copy link
Contributor

@bertschneider bertschneider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fmeum fmeum merged commit 78dd3fd into main Aug 14, 2023
12 checks passed
@fmeum fmeum deleted the FUZZ-782-fix-junit-reproducer branch August 14, 2023 13:38
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