github-vet / github-vet/rangeloop-pointer-findings
apache/rocketmq-client-go: consumer/push_consumer.go; 11 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [apache/rocketmq-client-go](https://www.github.com/apache/rocketmq-client-go) at [consumer/push_consumer.go](https://github.com/apache/rocketmq-client-go/blob/4c35ae2578d01d420a29bb6ae03401bc59f48fdf/consumer/push_consumer.go#L803-L813)
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 at line 805 may store a reference to k
[Click here to see the code in its original context.](https://github.com/apache/rocketmq-client-go/blob/4c35ae2578d01d420a29bb6ae03401bc59f48fdf/consumer/push_consumer.go#L803-L813)
Click here to show the 11 line(s) of Go which triggered the analyzer.
```go
for _, k := range queuesOfTopic {
if _, ok := table[k]; ok {
pc.storage.update(&k, table[k], false)
v, exist := pc.processQueueTable.Load(k)
if !exist {
continue
}
pq := v.(*processQueue)
pc.removeUnnecessaryMessageQueue(&k, pq)
}
}
```
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: 4c35ae2578d01d420a29bb6ae03401bc59f48fdf
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.