Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ jobs:
mkdir build && cd build
cmake -DENABLE_FUZZ=ON ..
make fuzz_lexer
./fuzz_lexer -i ../fuzz/corpus -o ./findings -t 1000
./fuzz_lexer -i ../tools/fuzz/corpus -o ./findings -t 1000
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,9 @@ guidelines.

## Fuzzing Tools

Experimental AFL++ harnesses live in `tools/fuzz`. You can build the
lexer fuzzer with Zig and run it against the sample corpus in
`fuzz/corpus` to discover crashes in the lexer and parser:

```bash
zig build fuzz-lexer
./zig-out/bin/fuzz_lexer -i fuzz/corpus -o findings
```
Experimental AFL++ harnesses live in `tools/fuzz`. They can be
built with CMake using `-DENABLE_FUZZ=ON` and run against the sample
corpus in `tools/fuzz/corpus` to discover crashes in the lexer and parser.


## Legacy Ouroboros Sources
Expand Down
7 changes: 4 additions & 3 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ zig build mod-test

If AFL++ is installed you can build the lexer fuzzer using Zig:

```bash
zig build fuzz-lexer
./zig-out/bin/fuzz_lexer -i fuzz/corpus -o findings
```
cmake -DENABLE_FUZZ=ON ..
make fuzz_lexer
./fuzz_lexer -i ../tools/fuzz/corpus -o ./findings
```
4 changes: 2 additions & 2 deletions tools/fuzz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ This directory contains the AFL++ based lexer fuzzer. Build it using Zig:
zig build fuzz-lexer
```

Provide a seed corpus in `fuzz/corpus` and run the fuzzer:
Provide a seed corpus in `corpus` and run the fuzzer:

```bash
./zig-out/bin/fuzz_lexer -i fuzz/corpus -o findings
./fuzz_lexer -i ../tools/fuzz/corpus -o ./findings
```

Crashes will be written to the `findings` directory for investigation.
1 change: 1 addition & 0 deletions tools/fuzz/corpus/seed1.ouro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
let x = 1;
Loading