Skip to content

Commit 2a92893

Browse files
authored
More detailed fuzzer report template (#6888)
## Summary The fuzzer template is confusing, even though I have worked with it a solid number of times at this point I always forget how to set it up correctly. Hopefully with these instructions it will lower the amount of time spent remembering what to do. ## Testing N/A Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
1 parent 735b8e0 commit 2a92893

1 file changed

Lines changed: 60 additions & 5 deletions

File tree

.github/scripts/fuzz_report/templates/new_issue.md

Lines changed: 60 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
**Crash Location**: `{{CRASH_LOCATION}}`
66

77
**Error Message**:
8+
89
```
910
{{PANIC_MESSAGE}}
1011
```
@@ -15,6 +16,7 @@
1516
```
1617
{{STACK_TRACE_RAW}}
1718
```
19+
1820
</details>
1921
{% if CLAUDE_ANALYSIS %}
2022

@@ -33,21 +35,74 @@
3335

3436
### Reproduction
3537

38+
<details>
39+
3640
1. Download the crash artifact:
3741
- **Direct download**: {{ARTIFACT_URL}}
38-
- Extract the zip file
42+
- Extract the zip file (`unzip`)
43+
- The path should look like `/path/to/{{FUZZ_TARGET}}/{{CRASH_FILE}}`
44+
- You can create a `./fuzz/artifacts` directory that will be git-ignored in the `vortex` repo
45+
- Full path would be `./fuzz/artifacts/{{FUZZ_TARGET}}/{{CRASH_FILE}}`
3946

4047
2. Reproduce locally:
48+
49+
```bash
50+
cargo +nightly fuzz run -D --sanitizer=none {{FUZZ_TARGET}} /path/to/crash_file -- -rss_limit_mb=0
51+
```
52+
53+
3. Get a backtrace:
54+
4155
```bash
42-
cargo +nightly fuzz run -D --sanitizer=none {{FUZZ_TARGET}} {{FUZZ_TARGET}}/{{CRASH_FILE}} -- -rss_limit_mb=0
56+
RUST_BACKTRACE=1 cargo +nightly fuzz run -D --sanitizer=none {{FUZZ_TARGET}} /path/to/crash_file -- -rss_limit_mb=0
4357
```
4458

45-
3. Get full backtrace:
4659
```bash
47-
RUST_BACKTRACE=full cargo +nightly fuzz run -D --sanitizer=none {{FUZZ_TARGET}} {{FUZZ_TARGET}}/{{CRASH_FILE}} -- -rss_limit_mb=0
60+
RUST_BACKTRACE=full cargo +nightly fuzz run -D --sanitizer=none {{FUZZ_TARGET}} /path/to/crash_file -- -rss_limit_mb=0
4861
```
4962

63+
</details>
64+
65+
### Workflow Example
66+
67+
Assuming you download the zipfile to `~/Downloads`, and your working directory is the repository
68+
root, you can follow these steps:
69+
70+
<details>
71+
72+
```bash
73+
# Create the artifacts directory if you haven't already.
74+
mkdir -p ./fuzz/artifacts
75+
76+
# Move the zipfile.
77+
mv ~/Downloads/{{FUZZ_TARGET}}-crash-artifacts.zip ./fuzz/artifacts/
78+
79+
# Unzip the zipfile.
80+
unzip ./fuzz/artifacts/{{FUZZ_TARGET}}-crash-artifacts.zip -d ./fuzz/artifacts/
81+
82+
# You can remove the zipfile now if you want to.
83+
rm ./fuzz/artifacts/{{FUZZ_TARGET}}-crash-artifacts.zip
84+
```
85+
86+
You can now reproduce with:
87+
88+
```bash
89+
cargo +nightly fuzz run -D --sanitizer=none {{FUZZ_TARGET}} ./fuzz/artifacts/{{FUZZ_TARGET}}/{{CRASH_FILE}} -- -rss_limit_mb=0
90+
```
91+
92+
If you want a backtrace:
93+
94+
```bash
95+
RUST_BACKTRACE=1 cargo +nightly fuzz run -D --sanitizer=none {{FUZZ_TARGET}} ./fuzz/artifacts/{{FUZZ_TARGET}}/{{CRASH_FILE}} -- -rss_limit_mb=0
96+
```
97+
98+
```bash
99+
RUST_BACKTRACE=full cargo +nightly fuzz run -D --sanitizer=none {{FUZZ_TARGET}} ./fuzz/artifacts/{{FUZZ_TARGET}}/{{CRASH_FILE}} -- -rss_limit_mb=0
100+
```
101+
102+
</details>
103+
50104
<!-- seed_hash:{{SEED_HASH}} stack_hash:{{STACK_TRACE_HASH}} message_hash:{{MESSAGE_HASH}} -->
51105

52106
---
53-
*Auto-created by fuzzing workflow*
107+
108+
_Auto-created by fuzzing workflow_

0 commit comments

Comments
 (0)