Skip to content

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

Open
@aiburegit

Description

@aiburegit

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_fuzz_dep.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_fuzz_dep.Sonar(__gofuzz_v1,  fqrequest.SeatSeconds(highR), 24878469)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions