dvyukov / go-fuzz

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

go-fuzz-build cannot determine dependency alias. #358

Open aiburegit opened 1 month ago

aiburegit commented 1 month ago

Hello! When I try to collect the target I get the following message: [user@8548b56971da server]$ ~/go/bin/go-fuzz-build -preserve crypto/internal/bigmod -work .           
workdir: /tmp/go-fuzz-build12999488
failed to execute go build: exit status 1
k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset
/home/user/kubernetes/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset.go:480: request.SeatSeconds undefined (type request has no field or method SeatSeconds)

In workdir:

//line /home/user/kubernetes/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset.go:480
               _go_fuzzdep.Sonar(__gofuzz_v1, request.SeatSeconds(highR), 24878469)

In queueset.go:480:

 case qs.currentR >= highR:
               qs.advanceEpoch(ctx, realNow, incrR)
       }  The thing is that in this module the package name is redefined: import ( ...  fqrequest "k8s.io/apiserver/pkg/util/flowcontrol/request" ... ) (it so happens that the project has a structure of the same name)

highRit matters precisely from  fqrequest. As I understand it, the error is as follows: go-fuzz-build, when getting dependencies, found the required package, but did not take into account that its name was overridden, and tries to use the original name of the package, which coincides with the structure of the same name. Expected result:  _go_fuzzdep.Sonar(__gofuzz_v1,  fqrequest.SeatSeconds(highR), 24878469)

wulie commented 1 month ago

这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

josharian commented 1 month ago

Thanks for the bug report. There is nobody actively working on go-fuzz, but PRs do get reviewed, albeit not always quickly.