pkg/rpctype: use string type for leak frames

We need them as string everywhere.
Not sure why they were []byte to begin with.
This commit is contained in:
Dmitry Vyukov 2019-05-20 18:49:39 +02:00
parent 4d4a4420e7
commit 2c9280d432
4 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,7 @@ type ConnectRes struct {
TargetRevision string
AllSandboxes bool
CheckResult *CheckArgs
MemoryLeakFrames [][]byte
MemoryLeakFrames []string
}
type CheckArgs struct {

View File

@ -186,7 +186,7 @@ func main() {
}
var gateCallback func()
if periodicCallback != nil {
gateCallback = func() { periodicCallback(r.MemoryLeakFrames) }
gateCallback = func() { periodicCallback(nil) }
}
if r.CheckResult.Features[host.FeatureExtraCoverage].Enabled {
config.Flags |= ipc.FlagExtraCover

View File

@ -889,7 +889,7 @@ func (mgr *Manager) minimizeCorpus() {
mgr.corpusDB.BumpVersion(currentDBVersion)
}
func (mgr *Manager) fuzzerConnect() ([]rpctype.RPCInput, [][]byte) {
func (mgr *Manager) fuzzerConnect() ([]rpctype.RPCInput, []string) {
mgr.mu.Lock()
defer mgr.mu.Unlock()
@ -898,9 +898,9 @@ func (mgr *Manager) fuzzerConnect() ([]rpctype.RPCInput, [][]byte) {
for _, inp := range mgr.corpus {
corpus = append(corpus, inp)
}
memoryLeakFrames := make([][]byte, 0, len(mgr.memoryLeakFrames))
memoryLeakFrames := make([]string, 0, len(mgr.memoryLeakFrames))
for frame := range mgr.memoryLeakFrames {
memoryLeakFrames = append(memoryLeakFrames, []byte(frame))
memoryLeakFrames = append(memoryLeakFrames, frame)
}
return corpus, memoryLeakFrames
}

View File

@ -38,7 +38,7 @@ type Fuzzer struct {
// RPCManagerView restricts interface between RPCServer and Manager.
type RPCManagerView interface {
fuzzerConnect() ([]rpctype.RPCInput, [][]byte)
fuzzerConnect() ([]rpctype.RPCInput, []string)
machineChecked(result *rpctype.CheckArgs)
newInput(inp rpctype.RPCInput, sign signal.Signal)
candidateBatch(size int) []rpctype.RPCCandidate