dvyukov / go-fuzz

Randomized testing for Go
Apache License 2.0
4.78k stars 279 forks source link

go-fuzz-build fix: not-package dirs #311

Open guzenok opened 3 years ago

guzenok commented 3 years ago

The fix makes Context.clonePackage() also copies not-package dirs, which are needed for build.

Not-package dir is a subdirectory of go-package directory, which doesn't contains any go-file. I.e. it is not a go-package, it can't be imported and it is not reflected by "golang.org/x/tools/go/packages". The ethereum libsecp256k1 is an example of such not-package dir. It is needed for "github.com/ethereum/go-ethereum/crypto/secp256k1" building but ignored by current Context.clonePackage(). PR fixes it.