google / gofuzz

Fuzz testing for go.
Apache License 2.0
1.5k stars 119 forks source link

Make the fuzzer threadsafe #61

Closed alvaroaleman closed 3 years ago

alvaroaleman commented 3 years ago

The fuzzer uses a prng from math/rand.NewSource which is not threadsafe. This change adds a simple lock into the fuzzer to allow using it from multiple goroutines in parallel.

/assign @lavalamp

lavalamp commented 3 years ago

OK, I guess this is better than a data race. If we figure out a better fix, we can always change this.