This repository was archived by the owner on Jan 10, 2024. It is now read-only.
This repository was archived by the owner on Jan 10, 2024. It is now read-only.
presence of an interface value always panics #27
Open
Description
Hello there, thank you for this project!
I am currently looking at using it to fuzz inputs to https://github.com/census-instrumentation/opencensus-service
However, if a struct has a field with a value whose type is an interface, regardless of if that field is set or not. For example
type A struct {
Name string
Debug bool
Err error
}
a := new(A)
f.Fuzz(a)
gofuzz will always crash with
On no value set
panic: Can't handle <nil>: interface [recovered]
panic: Can't handle <nil>: interface
On value set
panic: Can't handle &errors.errorString{s:"Foo"}: interface [recovered]
panic: Can't handle &errors.errorString{s:"Foo"}: interface
Perhaps we could skip trying to mutate interface values that we don't know about and let tests proceed normally, otherwise it becomes unproductive to debug this cryptic error.
Thank you.
Metadata
Metadata
Assignees
Labels
No labels