Commit 4917e8d
feat(bls): adding fuzz test for bls (#249)
This is moved from [this
PR](ChainSafe/blst-z#59).
to run the fuzzing:
(If you are on Linux)
e.g.,
1. `sudo apt install afl++`
2. cd `test/fuzz`
3. `zig build run-bls_public_key`
(If you are using MacOs)
1. `brew install afl++`
2. cd `test/fuzz`
3. follow the instruction in this
[session](https://github.com/jeffoodchain/lodestar-z/blob/jeff/fuzz-test/test/fuzz/README.md#on-macos).
4. run `zig build run-bls_public_key`
you could see the following dashboard running in your terminal
```bash
AFL ++4.09c {default} (...64d672b6e452d6305a3425b7e2487cb/public_key) [fast]
┌─ process timing ────────────────────────────────────┬─ overall results ────┐
│ run time : 0 days, 0 hrs, 0 min, 8 sec │ cycles done : 20 │
│ last new find : 0 days, 0 hrs, 0 min, 8 sec │ corpus count : 14 │
│last saved crash : none seen yet │saved crashes : 0 │
│ last saved hang : none seen yet │ saved hangs : 0 │
├─ cycle progress ─────────────────────┬─ map coverage┴──────────────────────┤
│ now processing : 2.197 (14.3%) │ map density : 0.17% / 0.48% │
│ runs timed out : 0 (0.00%) │ count coverage : 2.89 bits/tuple │
├─ stage progress ─────────────────────┼─ findings in depth ─────────────────┤
│ now trying : splice 10 │ favored items : 10 (71.43%) │
│ stage execs : 85/86 (98.84%) │ new edges on : 10 (71.43%) │
│ total execs : 424k │ total crashes : 0 (0 saved) │
│ exec speed : 52.7k/sec │ total tmouts : 0 (0 saved) │
├─ fuzzing strategy yields ────────────┴─────────────┬─ item geometry ───────┤
│ bit flips : disabled (default, enable with -D) │ levels : 2 │
│ byte flips : disabled (default, enable with -D) │ pending : 0 │
│ arithmetics : disabled (default, enable with -D) │ pend fav : 0 │
│ known ints : disabled (default, enable with -D) │ own finds : 7 │
│ dictionary : n/a │ imported : 0 │
│havoc/splice : 7/180k, 0/244k │ stability : 100.00% │
│py/custom/rq : unused, unused, unused, unused ├───────────────────────┘
│ trim/eff : 5.20%/170, disabled │ [cpu000: 31%]
└─ strategy: explore ────────── state: started :-) ──┘
```
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 parent f684a9f commit 4917e8d
File tree
83 files changed
+604
-37
lines changed- pkg/afl++
- test/fuzz
- corpus
- bls_aggregate_pk-cmin
- bls_aggregate_sig-cmin
- bls_public_key-cmin
- bls_signature-cmin
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
83 files changed
+604
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
| |||
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
49 | | - | |
50 | | - | |
| 55 | + | |
| 56 | + | |
51 | 57 | | |
52 | 58 | | |
53 | | - | |
54 | | - | |
| 59 | + | |
| 60 | + | |
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
| |||
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
65 | 75 | | |
66 | 76 | | |
67 | 77 | | |
| |||
71 | 81 | | |
72 | 82 | | |
73 | 83 | | |
74 | | - | |
| 84 | + | |
75 | 85 | | |
76 | 86 | | |
77 | 87 | | |
78 | 88 | | |
| 89 | + | |
79 | 90 | | |
80 | 91 | | |
81 | 92 | | |
| |||
90 | 101 | | |
91 | 102 | | |
92 | 103 | | |
93 | | - | |
| 104 | + | |
94 | 105 | | |
95 | 106 | | |
96 | 107 | | |
| |||
100 | 111 | | |
101 | 112 | | |
102 | 113 | | |
103 | | - | |
| 114 | + | |
104 | 115 | | |
105 | 116 | | |
106 | 117 | | |
107 | 118 | | |
108 | 119 | | |
109 | 120 | | |
110 | 121 | | |
111 | | - | |
| 122 | + | |
112 | 123 | | |
113 | 124 | | |
114 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| |||
Binary file not shown.
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| |||
0 commit comments