Skip to content

Add additional valid args to sanitize-coverage flag #1604

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

Merged

Conversation

thetruestblue
Copy link
Contributor

@thetruestblue thetruestblue commented May 12, 2024

Adds valid arguments to -sanitize-coverage: pc-table and inline-8bit-counter.

As is, you cannot set all default fuzzer options directly using -sanitize-coverage. Because of this you can use default fuzzer sanitize-coverage args, or a limited number coverage options.

This PR adds options to allow pc-table and inline-8bit-counter as valid args. These are default fuzzer options -- and will allow customizing sanitizer-coverage in variations of fuzzer defaults. (i.e. w/o pc-table enabled).

In upstream clang the option -fno-sanitize-coverage exists to disable various coverage options. Swift currently does not have a convention of using excluding args for sanitizer flags. This aims to limit the need for a new flag by inclusively setting desired coverage up to current fuzzer defaults.

corresponding change in swift: swiftlang/swift#73587

rdar://127950283

@thetruestblue thetruestblue marked this pull request as draft May 13, 2024 14:31
Adds valid arguments to sanitizer-coverage pc-table and inline-8bit-counter. Currently you cannot set all default fuzzer options directly using sanitizer coverage. Right now you can choose default fuzzer args, or a limited number coverage options. This PR extends coverage options to allow pc-table and inline-8bit-counter. This algins with default fuzzer options to allow customizing sanitizer-coverage in variations of fuzzer defaults. (i.e. Fuzzer defaults w/o pc-table enabled).

In upstream llvm the option -no-sanitize-coverage exists to disable various fuzzing options. Swift current does not have a convention of using excluding args. This aims to limit the need for that by being able to inclusively set desired coverage.

rdar://127950283
@thetruestblue thetruestblue force-pushed the add-sanitizer-coverage-args branch from ab8fb98 to 22b901e Compare May 13, 2024 15:05
@thetruestblue thetruestblue marked this pull request as ready for review May 13, 2024 15:06
@thetruestblue
Copy link
Contributor Author

@swift-ci test

@thetruestblue
Copy link
Contributor Author

@swift-ci please test Windows

@thetruestblue thetruestblue merged commit 6c9ab1d into swiftlang:main May 14, 2024
3 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.

4 participants