Skip to content

Instantly share code, notes, and snippets.

@MariusVanDerWijden
Last active May 20, 2020 21:21
Show Gist options
  • Save MariusVanDerWijden/e493338c07f72270d15a27c983f8cf1f to your computer and use it in GitHub Desktop.
Save MariusVanDerWijden/e493338c07f72270d15a27c983f8cf1f to your computer and use it in GitHub Desktop.
Input:
```
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00s\x00\x00d\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x99\xe6\u007f9\xea\x11\x01\x1a\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00"
```
Error:
```
unexpected fault address 0x3eb1ccb5
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x1 addr=0x3eb1ccb5 pc=0x57e944]
goroutine 1 [running]:
runtime.throw(0x61f785, 0x5)
runtime/panic.go:1116 +0x72 fp=0xc0000939b8 sp=0xc000093988 pc=0x431ac2
runtime.sigpanic()
runtime/signal_unix.go:702 +0x3cc fp=0xc0000939e8 sp=0xc0000939b8 pc=0x44594c
github.com/ethereum/go-ethereum/crypto/bls12381.Fallbacksub(0xc0000fc690, 0xc0000fbf20, 0xc0000fbf50)
/home/matematik/go/src/github.com/ethereum/go-ethereum/crypto/bls12381/arithmetic_fallback.go:171 +0xa4 fp=0xc0000939f0 sp=0xc0000939e8 pc=0x57e944
github.com/ethereum/go-ethereum/crypto/bls12381.(*fp2).square(0xc0002892e0, 0xc0001000c0, 0xc0000fbf20)
/home/matematik/go/src/github.com/ethereum/go-ethereum/crypto/bls12381/fp2.go:151 +0xa9 fp=0xc000093a40 sp=0xc0000939f0 pc=0x587099
github.com/ethereum/go-ethereum/crypto/bls12381.(*G2).Double(0xc000390fa0, 0xc0000fe480, 0xc0000fe480, 0xc0000fe480)
/home/matematik/go/src/github.com/ethereum/go-ethereum/crypto/bls12381/g2.go:336 +0x2f7 fp=0xc000093ac8 sp=0xc000093a40 pc=0x592567
github.com/ethereum/go-ethereum/crypto/bls12381.(*G2).MulScalar(0xc000390fa0, 0xc0000fe240, 0xc0000fe240, 0xc0000c0200, 0xc0001002a0)
/home/matematik/go/src/github.com/ethereum/go-ethereum/crypto/bls12381/g2.go:376 +0x140 fp=0xc000093b20 sp=0xc000093ac8 pc=0x592a40
github.com/ethereum/go-ethereum/crypto/bls12381.(*G2).ClearCofactor(...)
/home/matematik/go/src/github.com/ethereum/go-ethereum/crypto/bls12381/g2.go:383
github.com/ethereum/go-ethereum/crypto/bls12381.(*G2).MapToCurve(0xc000390fa0, 0xc000093c30, 0x60, 0x60, 0x30, 0x30, 0x0)
/home/matematik/go/src/github.com/ethereum/go-ethereum/crypto/bls12381/g2.go:456 +0x256 fp=0xc000093bf0 sp=0xc000093b20 pc=0x593a26
github.com/ethereum/go-ethereum/tests/fuzzers/bls12381.(*bls12381MapG2).Run(0x7c9e98, 0xc0000c4600, 0x80, 0x80, 0x1adb0, 0x100, 0x100, 0x0, 0x0)
/home/matematik/go/src/github.com/ethereum/go-ethereum/tests/fuzzers/bls12381/contracts.go:431 +0x206 fp=0xc000093ca8 sp=0xc000093bf0 pc=0x5cca16
github.com/ethereum/go-ethereum/tests/fuzzers/bls12381.Fuzz(0x7f6548234000, 0x80, 0x80, 0x3)
/home/matematik/go/src/github.com/ethereum/go-ethereum/tests/fuzzers/bls12381/bls_fuzzer.go:67 +0x3b6 fp=0xc000093ea8 sp=0xc000093ca8 pc=0x5c8d66
go-fuzz-dep.Main(0xc000093f70, 0x1, 0x1)
go-fuzz-dep/main.go:36 +0x1ad fp=0xc000093f58 sp=0xc000093ea8 pc=0x480fdd
main.main()
github.com/ethereum/go-ethereum/tests/fuzzers/bls12381/go.fuzz.main/main.go:15 +0x52 fp=0xc000093f88 sp=0xc000093f58 pc=0x5cd132
runtime.main()
runtime/proc.go:203 +0x212 fp=0xc000093fe0 sp=0xc000093f88 pc=0x434142
runtime.goexit()
runtime/asm_amd64.s:1373 +0x1 fp=0xc000093fe8 sp=0xc000093fe0 pc=0x45ead1
exit status 2
```
(go vs. NoADX/ADX)
Input:
```
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x99\xe6\u007f9\xea\x11\x01\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00"
```
Error:
```
panic: precomp 7: fallback: output not equal [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11 125 173 231 29 123 192 113 199 127 210 19 151 113 175 86 86 174 175 151 166 197 244 152 18 11 231 162 44 23 10 104 111 203 191 141 141 0 180 182 210 255 254 43 101 115 151 168 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 20 68 196 209 5 135 215 18 253 52 253 233 220 245 218 132 6 7 173 145 89 31 28 91 33 134 96 179 145 130 207 48 236 80 253 153 213 131 234 125 183 190 144 119 66 135 159 126 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 185 136 122 243 168 50 89 88 153 197 9 34 48 60 118 64 145 203 163 242 12 210 223 30 169 88 211 8 181 253 102 254 100 57 37 77 18 58 193 126 170 213 98 116 118 142 149 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 145 59 87 12 169 117 121 39 81 126 247 14 90 124 106 152 63 250 48 154 193 90 117 195 0 244 31 138 67 196 231 79 201 88 32 84 46 71 150 96 24 109 233 46 207 228 167] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 175 24 31 185 27 131 73 168 255 80 88 41 11 200 174 102 8 188 58 86 23 133 145 136 128 134 179 53 9 7 6 120 31 7 184 250 232 125 218 78 1 84 168 72 129 18 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 206 188 46 157 155 19 159 242 27 96 206 17 56 94 47 1 203 124 38 170 170 145 26 118 180 199 137 230 122 133 200 49 42 230 114 158 163 58 234 193 227 13 61 79 209 251 103 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 24 236 142 85 247 254 127 104 242 159 152 226 6 130 101 60 168 98 168 116 181 38 71 11 14 239 11 54 0 2 41 113 188 246 31 81 81 156 59 65 220 145 234 71 85 20 176 231 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 89 69 123 186 211 62 176 72 1 190 117 89 99 24 214 31 177 14 254 103 163 163 240 188 84 172 236 42 84 194 70 76 15 230 21 124 225 204 13 62 196 212 155 162 145 144 85]
goroutine 1 [running]:
github.com/ethereum/go-ethereum/tests/fuzzers/bls12381.Fuzz(0x7f4751454000, 0x80, 0x80, 0x3)
/home/matematik/go/src/github.com/ethereum/go-ethereum/tests/fuzzers/bls12381/bls_fuzzer.go:88 +0xdbf
go-fuzz-dep.Main(0xc000107f70, 0x1, 0x1)
go-fuzz-dep/main.go:36 +0x1ad
main.main()
github.com/ethereum/go-ethereum/tests/fuzzers/bls12381/go.fuzz.main/main.go:15 +0x52
exit status 2
```
(go vs. NoADX/ADX)
Input:
```
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00"
```
Output:
```
panic: precomp 7: fallback: output not equal [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 67 235 184 176 131 83 53 129 219 74 109 127 4 49 86 182 38 32 102 110 178 55 189 198 167 145 40 120 237 43 106 9 11 7 127 153 20 182 135 18 116 53 101 187 158 74 36 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 248 184 89 151 23 198 202 146 78 66 68 89 250 98 49 253 161 15 249 165 19 197 237 14 227 125 148 117 22 14 221 66 67 146 54 224 236 23 76 101 42 250 202 213 69 241 243 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 147 51 127 176 157 104 194 79 168 110 110 215 104 174 63 177 5 174 84 107 155 3 101 247 31 66 33 221 136 29 112 231 141 48 239 124 111 198 83 195 185 180 141 44 206 68 182 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 19 65 147 220 114 106 216 60 96 41 159 43 55 162 182 93 216 22 251 204 28 80 114 107 9 32 26 200 92 66 40 134 169 219 19 223 242 112 0 141 30 217 154 151 52 235 226 37] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 123 193 162 106 76 255 119 7 214 234 144 175 144 95 157 146 138 59 43 236 111 33 69 65 26 0 23 53 59 70 51 197 68 26 205 45 103 11 120 130 168 142 204 188 116 217 149 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 146 0 4 195 50 169 84 171 14 33 156 237 136 3 64 233 151 234 77 134 32 63 115 94 216 236 160 87 196 99 246 33 21 168 141 194 4 47 144 61 135 51 90 92 84 44 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 119 242 230 193 41 105 129 65 79 123 235 74 144 182 177 81 43 252 50 161 213 255 243 45 231 114 218 22 211 185 122 31 2 237 219 13 55 71 56 8 183 92 20 69 192 167 60 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 22 4 115 233 133 192 123 82 0 185 34 66 235 215 74 0 188 77 76 107 82 245 66 247 226 166 99 88 120 63 77 191 105 3 42 52 76 1 167 28 238 247 233 88 32 254 8 176]
goroutine 1 [running]:
github.com/ethereum/go-ethereum/tests/fuzzers/bls12381.Fuzz(0x7fd3f02a0000, 0x80, 0x80, 0x3)
/home/matematik/go/src/github.com/ethereum/go-ethereum/tests/fuzzers/bls12381/bls_fuzzer.go:88 +0xdbf
go-fuzz-dep.Main(0xc00008ff70, 0x1, 0x1)
go-fuzz-dep/main.go:36 +0x1ad
main.main()
github.com/ethereum/go-ethereum/tests/fuzzers/bls12381/go.fuzz.main/main.go:15 +0x52
exit status 2
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment