go-fuzz
go-fuzz copied to clipboard
go-fuzz-build fails on golang.org/x/exp/rand
failed to parse int literal '47026247687942121848144207491837523525': strconv.ParseUint: parsing "47026247687942121848144207491837523525": value out of range
https://github.com/golang/exp/blob/master/rand/rng.go#L29
Is a very large looking constant in this file.
Thanks! Good find. I have some significant changes queued for int literal collection. I’ll be sure to fix this in the process.
@josharian do you think it's possible to handle all possible consts in all contexts correctly? As far as I remember I just shuffled the code until it started compiling all packages that I was interested in.
@dvyukov I do. There are a few design decisions to be made relating to effective fuzzing that I don't know the answers to, but you might. I will start a new issue to discuss.
@josharian what's the status on this? i ran into this same issue today, and have implemented a quick-and-dirty hack to get around it, and would be happy to submit a PR if there's not a more principled approach coming down the pike.
There is no principled fix imminent. I’d be happy to look at a workaround PR, although I can’t guarantee it’d be merged. :)
Hi there, I'm just trying to get started with fuzz-testing a project I maintain.
However, I hit the very same issue when trying to run go-fuzz-build on a package I want to fuzz, because one of its dependencies uses golang.org/x/exp/rand.
Is there a workaround I could employ for this error?
Recently, I encountered a similar problem. After debugging, I found that the strconv.ParseUint function in the strconv package cannot handle the large number '47026247687942121848144207491837523525' which included in golang.org/x/exp/rand/rng.go. One possible solution is to use the -preserve flag with the golang.org/x/exp/rand package. However, please note that using -preserve=golang.org/x/exp may not be effective.