github-vet / github-vet/rangeloop-pointer-findings
coreos/coreos-assembler: tools/vendor/github.com/minio/minio/cmd/storage-rest-client.go; 3 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [coreos/coreos-assembler](https://www.github.com/coreos/coreos-assembler) at [tools/vendor/github.com/minio/minio/cmd/storage-rest-client.go](https://github.com/coreos/coreos-assembler/blob/60e6c83a6ec7e9f67231d3cbbe3987c833eb4758/tools/vendor/github.com/minio/minio/cmd/storage-rest-client.go#L580-L582)
Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first issue it finds, so please do not limit your consideration to the contents of the below message.
> function call which takes a reference to version at line 581 may start a goroutine
[Click here to see the code in its original context.](https://github.com/coreos/coreos-assembler/blob/60e6c83a6ec7e9f67231d3cbbe3987c833eb4758/tools/vendor/github.com/minio/minio/cmd/storage-rest-client.go#L580-L582)
Click here to show the 3 line(s) of Go which triggered the analyzer.
```go
for _, version := range versions {
encoder.Encode(&version)
}
```
Click here to show extra information the analyzer produced.
```
The following graphviz dot graph describes paths through the callgraph that could lead to a function calling a goroutine:
digraph G {
"(Add, 4)" -> {"(copyFileWithTar, 4)";"(NewImageSource, 2)";"(copyWithTar, 4)";}
"(Run, 1)" -> {"(computeEditsFromProg, 1)";"(processPkg, 2)";"(Run, 2)";}
"(Set, 2)" -> {"(Replace, 4)";}
"(Send, 1)" -> {"(NewSyncProducer, 2)";}
"(Read, 1)" -> {"(newEventFromJournalEntry, 1)";}
"(computeEditsFromProg, 1)" -> {}
"(runAnalyzers, 2)" -> {"(loadIssuesFromCache, 3)";"(saveIssuesToCache, 5)";}
"(parseStreaming, 2)" -> {"(Send, 1)";}
"(Do, 1)" -> {"(Decode, 1)";"(Upload, 1)";"(Expand, 2)";"(Decode, 2)";"(Delete, 2)";}
"(Copy, 2)" -> {"(Add, 4)";}
"(ConfigureTransport, 1)" -> {"(configureTransport, 1)";}
"(ChangesDirs, 4)" -> {"(collectFileInfoForChanges, 4)";}
"(Decode, 1)" -> {"(decode, 1)";"(dec, 5)";}
"(decode, 1)" -> {"(Parse, 2)";}
"(Put, 1)" -> {"(Put, 3)";"(Copy, 2)";"(Delete, 2)";"(Do, 1)";}
"(NewRequest, 3)" -> {"(Parse, 1)";}
"(Replace, 4)" -> {"(Fix, 4)";}
"(saveIssuesToCache, 5)" -> {}
"(Parse, 2)" -> {"(parseStreaming, 2)";}
"(dial, 1)" -> {"(dialWithoutProxy, 2)";}
"(Run, 3)" -> {"(Run, 2)";"(RunWithConfig, 2)";}
"(loadIssuesFromCache, 3)" -> {}
"(Format, 1)" -> {"(Do, 1)";"(Parse, 1)";}
"(RemoveAllRelative, 2)" -> {"(Open, 1)";}
"(Encode, 2)" -> {"(EncodeMsg, 1)";}
"(processPkg, 2)" -> {}
"(Expand, 2)" -> {"(parse, 1)";}
"(configureTransport, 1)" -> {"(addConnIfNeeded, 3)";}
"(newClient, 1)" -> {"(NewMaintenance, 1)";}
"(append, 1)" -> {}
"(NewReader, 2)" -> {}
"(Update, 3)" -> {"(Validate, 1)";}
"(SetTransportDefaults, 1)" -> {"(ConfigureTransport, 1)";}
"(NewMaintenance, 1)" -> {"(Dial, 1)";}
"(NewClient, 2)" -> {}
"(Open, 1)" -> {"(NewReader, 2)";}
"(GetDataWithRanges, 2)" -> {}
"(run, 3)" -> {"(runCmdContext, 2)";}
"(newClientTransport, 6)" -> {}
"(Write, 1)" -> {"(Do, 1)";"(Format, 1)";"(NewRequest, 3)";"(Update, 3)";"(Sum, 1)";"(Put, 1)";"(New, 1)";"(Parse, 1)";"(write, 3)";"(Copy, 2)";"(Remove, 1)";"(Set, 2)";"(Decode, 1)";}
"(tarPath, 1)" -> {"(TarWithOptions, 2)";}
"(TarWithOptions, 2)" -> {}
"(EncodeMsg, 1)" -> {"(Append, 1)";}
"(RunUsingChroot, 6)" -> {}
"(New, 1)" -> {"(Parse, 1)";"(NewClient, 2)";"(newClient, 1)";"(get, 1)";}
"(parse, 1)" -> {"(append, 1)";}
"(Append, 1)" -> {"(Execute, 3)";}
"(RunWithConfig, 2)" -> {"(CheckProgram, 1)";}
"(newEventFromJournalEntry, 1)" -> {"(Parse, 2)";}
"(Dial, 1)" -> {"(dial, 1)";}
"(clientHandshake, 2)" -> {"(newClientTransport, 6)";}
"(Remove, 1)" -> {"(RemoveAllRelative, 2)";"(delete, 3)";}
"(Put, 3)" -> {"(Create, 1)";}
"(Run, 2)" -> {"(runUsingRuntimeSubproc, 9)";"(RunUsingChroot, 6)";"(runAnalyzers, 2)";}
"(Diff, 5)" -> {"(ChangesDirs, 4)";}
"(dec, 5)" -> {"(Parse, 2)";}
"(NewClientConn, 3)" -> {"(clientHandshake, 2)";}
"(NewSyncProducer, 2)" -> {"(newSyncProducerFromAsyncProducer, 1)";}
"(dialWithoutProxy, 2)" -> {"(Dial, 3)";}
"(Encode, 1)" -> {"(Put, 1)";"(Copy, 2)";"(Encode, 2)";"(Set, 2)";"(New, 1)";"(Write, 1)";}
"(Upload, 1)" -> {"(Run, 1)";"(GetDataWithRanges, 2)";}
"(write, 3)" -> {"(Create, 1)";}
"(Execute, 3)" -> {}
"(Diff, 3)" -> {"(Diff, 5)";}
"(collectFileInfoForChanges, 4)" -> {}
"(Delete, 2)" -> {"(Validate, 1)";}
"(runCmdContext, 2)" -> {}
"(Dial, 3)" -> {"(NewClientConn, 3)";}
"(Decode, 2)" -> {"(parse, 1)";"(decode, 1)";}
"(runUsingRuntimeSubproc, 9)" -> {}
"(Fix, 4)" -> {"(Run, 3)";}
"(CheckProgram, 1)" -> {}
"(newSyncProducerFromAsyncProducer, 1)" -> {}
"(Sum, 1)" -> {"(Read, 1)";}
"(copyFileWithTar, 4)" -> {}
"(delete, 3)" -> {"(Execute, 3)";}
"(NewImageSource, 2)" -> {"(Diff, 3)";}
"(copyWithTar, 4)" -> {"(tarPath, 1)";}
"(get, 1)" -> {"(Open, 1)";"(SetTransportDefaults, 1)";}
"(Parse, 1)" -> {"(parse, 1)";"(Replace, 4)";}
"(Create, 1)" -> {"(Open, 1)";}
"(Validate, 1)" -> {"(Append, 1)";"(Parse, 2)";}
"(addConnIfNeeded, 3)" -> {"(run, 3)";}
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a **Bug** :-1:, **Mitigated** :+1:, or **Desirable Behavior** :rocket:
See the descriptions of the classifications [here](https://github.com/github-vet/rangeclosure-findings#how-can-i-help) for more information.
commit ID: 60e6c83a6ec7e9f67231d3cbbe3987c833eb4758
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.