github-vet / github-vet/rangeloop-pointer-findings
DQNEO/gojvm: main.go; 11 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [DQNEO/gojvm](https://www.github.com/DQNEO/gojvm) at [main.go](https://github.com/DQNEO/gojvm/blob/851bf7503dd9b9c21972c1789c06e9f6b292fed2/main.go#L470-L480)
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.
> reference to methodInfo is reassigned at line 471
[Click here to see the code in its original context.](https://github.com/DQNEO/gojvm/blob/851bf7503dd9b9c21972c1789c06e9f6b292fed2/main.go#L470-L480)
Click here to show the 11 line(s) of Go which triggered the analyzer.
```go
for _, methodInfo := range cf.methods{
cf.methodMap[methodInfo.name_index] = &methodInfo
methodName := cp.getUTF8AsString(methodInfo.name_index)
debugf(" #0x%02x %s:\n", methodInfo.name_index, methodName)
for _, ca := range methodInfo.ai {
for _, c := range ca.code {
debugf(" %02x", c)
}
}
debugf("\n")
}
```
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: 851bf7503dd9b9c21972c1789c06e9f6b292fed2
Contributor guide
No contributing guide indexed for this repository
Research direction
Review main.go lines 470-480 and the linked analyzer context first. Classify the reported range-loop pointer behavior by leaving the appropriate reaction; done means selecting Bug, Mitigated, or Desirable Behavior based on the referenced code and classification guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100