-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic in TestFuzzBytes #45
Comments
@lgierth could you paste the stack trace from a panic? |
Having it happen about 3/4th of the runs here.
|
I think I know what this is. Probably has to do with NewMultiaddrBytes uses the slice that is passed-in. When this slice is re-used it screws the multiaddress completely. It happens when deserializing anything with an optimized decoder that re-uses previously allocated slices. The solution is a |
I have a fuzzer running on it and at the moment it seems alright (155457102 iterations). |
I know that the multiaddress mutates after https://godoc.org/github.com/ugorji/go/codec uses UnmarshalBinary() because (I guess) the underlying byte slice is re-used or altered and it gives exactly this problem. But you're right, I don't see how this would happen in this test. |
…work use the ipnet.PSK instead of the ipnet.Protector for private networks
If I bump up the number of iterations to 10,000,000 I reliably get panics in
(*multiaddr).String()
.The text was updated successfully, but these errors were encountered: