Skip to content

Commit

Permalink
pkg/rpctype: use string type for leak frames
Browse files Browse the repository at this point in the history
We need them as string everywhere.
Not sure why they were []byte to begin with.
  • Loading branch information
dvyukov committed May 20, 2019
1 parent 4d4a442 commit 2c9280d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/rpctype/rpctype.go
Expand Up @@ -34,7 +34,7 @@ type ConnectRes struct {
TargetRevision string
AllSandboxes bool
CheckResult *CheckArgs
MemoryLeakFrames [][]byte
MemoryLeakFrames []string
}

type CheckArgs struct {
Expand Down
2 changes: 1 addition & 1 deletion syz-fuzzer/fuzzer.go
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions syz-manager/manager.go
Expand Up @@ -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()

Expand All @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion syz-manager/rpc.go
Expand Up @@ -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
Expand Down

0 comments on commit 2c9280d

Please sign in to comment.