Allowlist for SanitizerCoverage
Open
Nobody has claimed this yet.
A-sanitizers
C-bug
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
clang provide option fsanitize-coverage-allowlist to pass allow list to SanitizerCoverage, it passes option in code like below
static void addSanitizers(const Triple &TargetTriple,
const CodeGenOptions &CodeGenOpts,
const LangOptions &LangOpts, PassBuilder &PB) {
MPM.addPass(SanitizerCoveragePass(
SancovOpts, CodeGenOpts.SanitizeCoverageAllowlistFiles,
CodeGenOpts.SanitizeCoverageIgnorelistFiles));
...
}
However, rust seems only can use -Cllvm-args to pass option registered by cl::opt etc., thus has no chance to pass allowlist
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how rustc configures SanitizerCoverage and forwards coverage options to LLVM; the issue shows that allowlists currently require -Cllvm-args. Compare this path with Clang's SanitizerCoverageAllowlistFiles handling. Done means Rust can pass a SanitizerCoverage allowlist without requiring raw LLVM arguments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100