oss-fuzz/docs/reference.md

31 lines
1.3 KiB
Markdown
Raw Normal View History

2016-12-29 22:31:38 +00:00
# Reference
## Sanitizers
Fuzzers are usualy built with one or more [sanitizer](https://github.com/google/sanitizers) enabled.
2016-12-29 22:32:42 +00:00
You can select sanitizer configuration by specifying `$SANITIZER` build environment varible using `-e` option:
2016-12-29 22:31:38 +00:00
```bash
python infra/helper.py build_fuzzers -e SANITIZER=undefined json
```
Supported sanitizers:
| `$SANITIZER` | Description
| ------------ | ----------
| `address` *(default)* | [Address Sanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer) with [Leak Sanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer).
| `undefined` | [Undefined Behavior Sanitizer](http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html).
| `memory` | [Memory Sanitizer](https://github.com/google/sanitizers/wiki/MemorySanitizer). *NOTE: It is critical that you build __all__ the code in your program (including libraries it uses) with memory sanitizer.*
2016-12-29 22:33:37 +00:00
Compiler flag values for predefined configurations are specified in the [Dockerfile](../base-images/base-builder/Dockerfile).
2016-12-29 22:31:38 +00:00
These flags can be overriden by specifying `$SANITIZER_FLAGS` directly.
2016-12-29 22:32:42 +00:00
You can choose which configurations to automatically run your fuzzers with in `project.yaml` file ([sqlite3](../../../projects/sqlite3/project.yaml)):
```yaml
sanitizers:
- address
- undefined
```