Skip to content

Commit 510192e

Browse files
committed
add fuzz-issue for reproduction
It takes a long time to parse in debug mode, but ulitmately it's just a lot of work along with plenty of allocations.
1 parent 1b957c5 commit 510192e

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

gix-config/tests/fixtures/clusterfuzz-testcase-minimized-gix-config-parse-6431708583690240

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

gix-config/tests/parse/from_bytes.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ fn fuzz() {
88
Events::from_str("[]A=\\\\\r\\\n\n").is_err(),
99
"empty sections are not allowed, and it won't crash either"
1010
);
11+
assert!(
12+
Events::from_str(include_str!(
13+
"../fixtures/clusterfuzz-testcase-minimized-gix-config-parse-6431708583690240"
14+
))
15+
.is_err(),
16+
"works without hanging - these 400kb take 10s in debug mode right now, but just as long in release mode. With nom all tests ran in below 1s in debug mode"
17+
);
1118
}
1219

1320
#[test]

gix-revision/fuzz/Cargo.lock

Lines changed: 11 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)