github-vet / github-vet/rangeloop-pointer-findings
finogeeks/Ligase: federation/federationapi/entry/send.go; 10 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [finogeeks/Ligase](https://www.github.com/finogeeks/Ligase) at [federation/federationapi/entry/send.go](https://github.com/finogeeks/Ligase/blob/8f19aecc37320cfe01878bc918d372276754d8a6/federation/federationapi/entry/send.go#L181-L190)
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 edu at line 184 may start a goroutine
[Click here to see the code in its original context.](https://github.com/finogeeks/Ligase/blob/8f19aecc37320cfe01878bc918d372276754d8a6/federation/federationapi/entry/send.go#L181-L190)
Click here to show the 10 line(s) of Go which triggered the analyzer.
```go
for _, edu := range trans.EDUs {
switch edu.Type {
case "profile":
rpcCli.ProcessProfile(&edu)
case "receipt":
rpcCli.ProcessReceipt(&edu)
case "typing":
rpcCli.ProcessTyping(&edu)
}
}
```
Click here to show extra information the analyzer produced.
```
The following paths through the callgraph could lead to a goroutine:
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Check, 2) -> (IncCheckReset, 2) -> (CAS, 2) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (insertEvent, 10) -> (sendSyncLoadReqAndHandle, 2)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (Send, 6)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (ClaimOneTimeKeys, 5)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (buildSyncData, 3)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (insertEvent, 10) -> (SetAvatarURL, 9)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (insertEvent, 10) -> (ClaimOneTimeKeys, 5)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (insertEvent, 10) -> (buildSyncData, 3)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (buildLoadRequest, 1) -> (sendSyncLoadReqAndHandle, 2)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Check, 2) -> (IncCheckReset, 2) -> (CAS, 2) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (insertEvent, 10)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (SendEvent, 3)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (SendEDU, 3)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (processBackfill, 1) -> (Process, 1)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (insertEvent, 10) -> (processBackfill, 1) -> (Process, 1)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (insertEvent, 10) -> (Process, 1)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (stop, 0)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (LoadStates, 3)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Check, 2) -> (IncCheckReset, 2) -> (CAS, 2)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Check, 2) -> (IncCheckReset, 2) -> (CAS, 2) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Check, 2) -> (IncCheckReset, 2) -> (CAS, 2) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (SetAvatarURL, 9)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (SetDisplayName, 9)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (insertEvent, 10) -> (processBackfill, 1)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Write, 1) -> (New, 1) -> (new, 1) -> (Timeout, 1) -> (GetInstance, 0) -> (newPrometheus, 0)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Check, 2) -> (IncCheckReset, 2) -> (CAS, 2) -> (CheckCert, 2) -> (, 0) -> (addPrefix, 2) -> (AddSync, 1)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Check, 2) -> (IncCheckReset, 2) -> (CAS, 2) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Check, 2) -> (IncCheckReset, 2) -> (CAS, 2) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (insertEvent, 10)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (QueryPKeys, 6)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (insertEvent, 10) -> (LoadStates, 3)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (insertEvent, 10) -> (sendSyncLoadReqAndHandle, 2)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Insert, 2) -> (Delete, 1) -> (Lookup, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (processBackfill, 1)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (insertEvent, 10) -> (SetDisplayName, 9)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Enabled, 1) -> (Level, 0) -> (Load, 0) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (insertEvent, 10) -> (QueryPKeys, 6)
(ProcessProfile, 1) -> (Pub, 2) -> (Errorf, 2) -> (log, 4) -> (Check, 2) -> (IncCheckReset, 2) -> (CAS, 2) -> (CheckCert, 2) -> (Load, 1) -> (loadConfig, 1) -> (Getpid, 0) -> (newZapLogger, 1) -> (ReplaceGlobals, 1) -> (optionFunc, 1) -> (WriteEvent, 11) -> (insertEvent, 10) -> (Process, 1)
```
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: 8f19aecc37320cfe01878bc918d372276754d8a6
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.