github-vet / github-vet/rangeloop-pointer-findings
naredula-jana/Golang-Ring0: go1.14.2/src/cmd/compile/internal/ssa/debug.go; 15 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [naredula-jana/Golang-Ring0](https://www.github.com/naredula-jana/Golang-Ring0) at [go1.14.2/src/cmd/compile/internal/ssa/debug.go](https://github.com/naredula-jana/Golang-Ring0/blob/fdc9cdad1a4f27eaa4105d0b5c96a075d2e8414f/go1.14.2/src/cmd/compile/internal/ssa/debug.go#L360-L374)
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 slot is reassigned at line 366
[Click here to see the code in its original context.](https://github.com/naredula-jana/Golang-Ring0/blob/fdc9cdad1a4f27eaa4105d0b5c96a075d2e8414f/go1.14.2/src/cmd/compile/internal/ssa/debug.go#L360-L374)
Click here to show the 15 line(s) of Go which triggered the analyzer.
```go
for i, slot := range f.Names {
state.slots = append(state.slots, slot)
if slot.N.IsSynthetic() {
continue
}
topSlot := &slot
for topSlot.SplitOf != nil {
topSlot = topSlot.SplitOf
}
if _, ok := state.varParts[topSlot.N]; !ok {
state.vars = append(state.vars, topSlot.N)
}
state.varParts[topSlot.N] = append(state.varParts[topSlot.N], SlotID(i))
}
```
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: fdc9cdad1a4f27eaa4105d0b5c96a075d2e8414f
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.